on 02-05-2013 6:21 AM
Hi All,
We've a requirement as follows,
There are two jobs
Job A : Runs at 5 PM
Job B: Runs at 8 PM
Dependency:
If Job A completes before 8 PM, then Job B should get triggered at 8 PM
OR
If Job A is over running even after 8 PM, then Job B should wait till Job A completes and then get triggered.
An elaborate procedural reply would be much appreciated.
Regards,
Harsha
Hello,
Create a chain with two steps running jobs A and B after each other. Submit the chain at 5AM, this will trigger the first job. Now set the Start Time scheduling parameter on the second job (inside the chain) at an expression, something like =Time.expressionNow('truncate day add 8 hours') this will set the start time of the second job at 8AM.
Regards Gerben
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But the request was to start at 8PM not 8AM. Can you elaborate on the function of:
=Time.expressionNow('truncate day add 8 hours')
I would have thought that simply setting the start time as 8PM on step 2, if in a chain, would mean it'll be delayed if step 1 overruns and otherwise will start at the set time?
Also the start time field on a chain step seems strangely to be a free text field? (see image)
Hello Harsha,
Yes M26 will indeed not support that feature. In that case do not make a job chain, but schedule your jobs at 5PM and 8PM. To make the dependency between the two create an event that is raised by Job A and make job B wait for it. This will achieve the same goal.
Note that M26.12 is already 4 years old and not really a supported version anymore. Consider upgrading.
Regards Gerben
Hello Jamie,
Yeah so make it =Time.expressionNow('truncate day add 20 hours') for 8PM.
The reason the start time field is a free text field is because it allows you to set expressions (start with =). I must say I have never tried setting 8PM as the start time, maybe that works too.
Regards Gerben
Hello Harsha,
Go to Definitions->Event Definitions and create a new Event Definition (give it a useful name).
Now go to Job Definition A and go to the Job Raise Events. Add your newly created Event Definition there and specify to Raise on status Completed.
Now go to Job Definition B and go to the Job Wait Events. Add the same Event Definition here and specify to Never auto submit and check the clears event box.
Now submit Job A at 5PM and submit Job B at 8PM. Job B will now wait until the event is raised when it is not yet raised at 8PM.
Regards Gerben
Hi Harsha,
Could you please help me, even we have the same dependency requirement.
We have some dependency event triggred process chians.
After successful completion of Process chain A it triggers Process chain B.
in this scenario how to schedule the chains in cps. can you please let me know.
That would be great help.
Regards,
Usha
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.