Currently what I do is to estimate when job1 will be finished, then using the “#PBS -a [myEstimatedTime+5]" directive I run qsub for job2. But I’m not happy with my approach since sometimes it is over/under estimated.
Is there any better solution?
Currently what I do is to estimate when job1 will be finished, then using the “#PBS -a [myEstimatedTime+5]" directive I run qsub for job2. But I’m not happy with my approach since sometimes it is over/under estimated.
Is there any better solution?
The best way to do this is through job dependencies. You can submit the jobs:
This won't make it execute 5 seconds after, but it will place a hold on the job (can't run) until after the first job finishes. In practice it will run more than about 5 seconds after because most scheduling iterations take more time than that anyway.
Add a time-killing job that runs 5 minutes between job1 and job2. The cluster's running order will be job1 -> job (for waiting 5 mins) -> job2.