Using CA Workload Automation ESP Edition how to run two jobs on the next workday after a weekend but one day apart of each other

Document ID : KB000024810
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:

I have a job that runs on the 11th day of the month. If that day is a Saturday or Sunday it is to run the next workday.

There is second job that runs on the 12th day of the month. If that day is a Saturday or Sunday it is suppose to run the next workday, but it cannot run the same day as the 11th job?

Answer:

Example #1

JOB JOBA
    RUN 11TH DAY OF MONTH PLUS 0 WORKDAY
ENDJOB

JOB JOBB
    RUN 12TH DAY OF MONTH PLUS 1 WORKDAY
ENDJOB

Example #2

JOB JOBA
    RUN 11TH DAY WITHIN MONTH
    IF TODAY('SAT') OR TODAY('SUN') THEN +
    DELAYSUB TODAY PLUS 0 WORKDAYS
ENDJOB

JOB JOBB
    RUN 12TH DAY WITHIN MONTH
    IF TODAY('SAT') THEN DELAYSUB TODAY PLUS 1 WORKDAYS
    IF TODAY('SUN') THEN DELAYSUB TODAY PLUS 2 WORKDAYS
ENDJOB