Exercise 6c: Deferral
Another option is to delay the time for when the job will start running. If for some reason we want specific time, we can set deferral_time in the submit file. The job will be submitted normally and it will match with an execute machine but it will wait until the defined time in order to run. Since the job will claim the machine, no job can run until the defined deferral_time. To make use of the wasted time, deferral_prep_time can be defined in the submit file. It defines in seconds the time in which the job has to be matched with a machine before the deferral_time.
For example, deferral_prep_time = 120 means that the attribute delays the job from being matched until 120 seconds before the defined deferral_time.
There is a propability that job will be delayed due to file transfers, etc. In that case deferral_window must be set which gives time to the job before condor removes it. Both deferral_time and deferral_window are in seconds.
In this exercise the job will run five minutes after the matching with an execute machine. The script welcome.sh, contains a simple command:
#!/bin/bash echo "welcome to HTCondor tutorial"
Create exercise6c.sub using the following:
executable = welcome.sh arguments = $(ClusterId)$(ProcId) output = output/ex06.$(ClusterId).$(ProcId).out error = error/ex06.$(ClusterId).$(ProcId).err log = log/ex06.$(ClusterId).log deferral_time = (CurrentTime + 300) deferral_window = 180 queue
Execute condor_submit exercise6c.sub to submit the jobs.
- The job's status will be Run even if it is not running and waiting for the defined time.
- The deferral_time is matching with the execution's machine clock and not the submission's machine clock.
- This command does not work in the schedulers universes (e.g DAG).
- The deferral_time is in Unix epoch time, if the job is to be run another day, Unix epoch time has to be set.