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

Re: [Condor-users] how to resrict job run time



> >Use periodic_remove or periodic_hold in the job submission file.  See
> >the condor_submit manual for details.
> >
> >--Dan
> 
> I did try that, but found a problem:
> 
> Adding the following lines to my submission script do work:
> 
> maxRunTime               = 60
> periodic_remove = (RemoteWallClockTime > $(maxRunTime))
> 
> However, the value for RemoteWallClockTime will only be updated if the job
> is being suspended. Since it sometimes happens that a job runs on a
> machine without being preempted much longer than $(maxRunTime), the
> expression for periodic_remove cannot evaluate to true.
> 

How about the following:
periodic_hold = (JobStatus == 2) && ((CurrentTime - JobCurrentStartDate) >
$(maxRunTime))
periodic_release = TRUE

This worked for our purpose, which was for a job to restart after a certain
amount of time.  We had jobs that for some reason would "run away"
sometimes, but when they were restarted would work just fine, so the goal
here was to restart (vanilla job, so hold and then immediately release would
do the trick).

Michael.