cancel
Showing results for 
Search instead for 
Did you mean: 

Need to schedule the Job on the basis of completion time of previous Job

Former Member
0 Kudos

Hi All

We have a requirement to select the run of the job on the basis of the completion of the previous job.

Let me explain this.

We have a Job Chain "X" which is scheduled to run at 10PM.So the requirement is like if this job completes before 12AM , It should trigger Job Chian "Y" or If this Job completes after 12 AM , It should trigger Job "Z".

I have been trying this for 2 days.Can anyone help me urgently.

Regards

Yogesh Bhatt

Accepted Solutions (1)

Accepted Solutions (1)

gmblom
Active Contributor
0 Kudos

Hello,

Looks like you need different variant selection parameters depending on whether the process started before or after midnight? If that is the case you have a couple of options:

1) use a precondition on job Y: =Time.toFormattedString(Time.now('your timezone'),'HHmm') >= 1200 and a precondition on job Z: =Time.toFormattedString(Time.now('your timezone'),'HHmm') < 1200

2) use an expression for the variant selection: =Logic.if(Time.toFormattedString(Time.now('your timezone'),'HHmm') >= 1200, '<variant before midnight>', '<variant after midnight>')

3) set the variant parameters directly from the job, these will be calculated when the job starts so you will always have the correct selection criteria.

Regards Gerben

Former Member
0 Kudos

Hi Blom

Thanks you very much for your prompt Reply.

I tried using this technique.

Made the Job "Y" and "Z" in the Job "X". Now in the precondition parameter of Y and Z Job I used the Time Window Technique of (10PM ~ 11:59PM) and (12:00AM ~ 9:59PM).

This helped the situation.

Regards

Yogesh Bhatt

Answers (0)