[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] Do not run jobs during work hours



Being in the corporate, rather than the academic world, I would probably need about six signatures to disclose my code even though it's very similar to page 356 of the 3.4.9 manual, but some of it is pretty obvious:

IsNighttime = ( ! IsDaytime )
IsWeekend = ( ! IsWeekday )
IsBusinessHours = ( IsDaytime && IsWeekday )
IsAfterHours = ( ! IsBusinessHours )

:D :D

These become machine attributes via startd_attrs, so that users can do this for their large, non-urgent runs:

Requirements = TARGET.IsWeekend

My main excursion from the manual's text, aside from separating the day and time attributes, is the situation of having to handle when the nighttime overlaps midnight GMT - in Eastern time, GMT+5 or +4 (or points west), if you have your Nighttime start at 8pm in the summer and 7pm in winter, that translates to ClockMin == 60 in the UTC system time zone from November to March and ClockMin == 0 from March through October, so you need two clauses for daytime and nighttime unlike one as Dennis showed in his GMT+1/+2 Netherlands time zone or the example in the manual.

If you don't have your system time zone set to UTC, and you don't mind having two syslog entries at 2:30am an hour apart once per year, and a 1:59am log entry immediately followed by a 3:00am log entry once per year, then you can avoid that extra ClassAd logic to handle when the night end time is less than its start time.

	-Michael Pelletier.

-----Original Message-----
From: HTCondor-users [mailto:htcondor-users-bounces@xxxxxxxxxxx] On Behalf Of John G Heim
Sent: Tuesday, October 11, 2016 4:21 PM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: Re: [HTCondor-users] Do not run jobs during work hours

I'd like to do the same. Can you give the code yu used to  set up STARTD_ATTRS for IsWeekday, IsDaytime, and IsBusinessHours? Thanks.