Deferring Job Execution

As the cluster tends to be busier during the weekdays, it may be advantageous to delay the execution of your job until evening or weekends. To set the date/time on which a job becomes eligible to run, use the -a option of the qsub command. It allows you to submit now, run later.

Here’s an example that schedules a job to run at 10:15 am:
qsub -a 1015 jobscript.sh
The job will run today, if submitted at or before 10:15 am, or tomorrow, if submitted after 10:15 am.

This option can also be added to a PBS script with this PBS directive:
#PBS -a 1015

Here’s another example that schedules a job to run at 3:30 pm on Jan. 8, 2017:
qsub -a 201701081530 jobscript.sh

The date_time argument is in the form: [[[[CC]YY]MM]DD]hhmm[.SS]

CC is the first two digits of the year (the century)
YY is the second two digits of the year
MM is the two digits for the month
DD is the day of the month
hh is the hour
mm is the minute
SS is the seconds

The only required specifiers are ‘hhmm’. All others ( CC, YY, MM and DD ) are optional. If the optional specifiers are not used, then their default values are derived from the current date.

The job in the first example above was submitted at 10:10 am on Nov. 18, 2016. Since only ‘1015’ is specified in the qsub command, it is interpreted to be ‘201611181015’. With the current time being 10:10 am, it will be scheduled to run in about five minutes. You can confirm this by running the checkjob command.

Here’s part of the checkjob output that shows the job is currently in ‘Hold’ status, but is eligible to start in 4 minutes and 10 seconds.

State: Hold
...
NOTE: job cannot run (user specified start date not reached for 00:04:10)
NOTE: job cannot run (job has hold in place)

See the qsub man page for more information.

You may also like...

Leave a Reply