Skip to Content
0

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

Feb 09, 2017 at 01:38 PM

64

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
G.M. Blom Mar 10, 2017 at 03:03 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Feb 13, 2017 at 03:27 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Dana Ullrich Feb 14, 2017 at 09:34 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded