|
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
mojoyrider
Joined: 07 Aug 2007 Posts: 20
|
|
Prevent Job from Starting if Another Job Instance is Running |
|
We have jobs that can run much longer than expected based on availability of other servers and databases and the volume of data to process.
Some of our jobs are scheduled to run at recurring time intervals.
We have run into problems where the first job has not finished, and the second job (same job) starts based on the time interval.
What is the best method to have a job NOT start if another instance of this job is already running?
|
|
Fri Sep 16, 2011 8:55 am |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7903
|
|
|
|
This is quite easy. They should be set to run in synchronous mode. This way only one instance is run at a time. If you need to lock multiple jobs that cannot run concurrently, assign them all to the same queue. Again, they should be set to run in synchronous mode.
PS. If necessary create a new dedicated queue for these jobs.
|
|
Fri Sep 16, 2011 3:04 pm |
|
|
barefootguru
Joined: 10 Aug 2007 Posts: 195
|
|
|
|
In combination with the above you can use 'Skip this job if delay is over x minutes'.
I've set all our hourly jobs to be skipped if the delay is over 60 minutes: if the first hourly job takes > 60 minutes then the following one will be skipped--the second job gets queued right on time behind the first, but when it finally gets to run it'll be skipped.
Cheers
|
|
Sun Sep 18, 2011 10:46 pm |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|