cancel
Showing results for 
Search instead for 
Did you mean: 

Job2 should start after Job1 but maximum 4 minutes later than Job1

0 Kudos

Hello,

I want to run 5 Jobs sequentiell but not completely.

Usually the jobs are running <1 minutes each and so the chain could run with 5 steps with 1 job each.

Sometimes a job runs 30 minutes or longer. If this happens the next step should start after a runtime of previous step of 4 minutes.

How can I handle this?

A first draft was, to put all jobs in one step and insert after the first job 4 sleep-jobs with 4,8,12 and 16 minutes wait time and a counted lock=5 for all the jobs in this chain (5 working Jobs and 4 sleeping jobs).

It works but it isn't perfect. The chain is running 16minutes every day although the working jobs are running not even 5 minutes.

Best regards

Dana Ullrich

Accepted Solutions (1)

Accepted Solutions (1)

gmblom
Active Contributor
0 Kudos

Hi Dana,

This is an interesting request and not so easy to implement. You could do it with events and all jobs in one step. Make the dependency between the jobs using events. And schedule System_RaiseClearEvent jobs in the same step, with the start time scheduling parameter set. These will raise the events when the other job was not finished yet after x minutes. The Raise Clear Event jobs must have a precondition that checks that the event was not raised already.

Regards Gerben

Answers (2)

Answers (2)

0 Kudos

Hello,

if all jobs start at the same time the database could get problems to handle all requests.

After a while (max. 4min) the batch processing is in another stadium where it is no problem to start the next one.


Best regards

Dana Ullrich

basv
Explorer
0 Kudos

Hi,

What is the reason why these jobs can not run at the same time ?

If it's allowed to run 2 of the jobs at the same time after 4m, why not right from the start ?

Kr,

Bas