Running two jobs on the next workday, after a weekend, but one day apart of each other.
search cancel

Running two jobs on the next workday, after a weekend, but one day apart of each other.

book

Article ID: 24810

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

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

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

 

Environment

Release: All
Component: ESP Workload Automation

Resolution

Example1:

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

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

Example2:

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