Hi Jonathan,
I think the easiest way to make this work is in two parts. The job will build every 45 days and wait to run until the next business day.
This is at the event level.
SCHEDULE EVERY 45 DAYS STARTING MARCH 20
Below is the job definition. The DELAYSUB plus 0 WORKDAYS will make it wait until the next workday.
JOB ABC
RUN DAILY
DELAYSUB 08.00 PLUS 0 WORKDAYS
ENDJOB
NOTE:
I think I could also do it in an application without the SCHEDULE statement at the event level. It would use a similar two step approach but it would take 8-10 lines of CLANG.
2¢
Don
Original Message:
Sent: 03-17-2020 07:24 AM
From: Jonathan Calloway
Subject: Run a Job Every 45 Days Except on Weekends or Holidays
All,
I apologize for having originally posted this in the wrong place.
I have a requirement to run a job every 45 days except for weekends or holidays. If I use the example of a two week job (i.e. RUN EVERY TWO WEEKS BEGINNING MARCH 20, 2020 PLUS 0 WORKDAYS) it works just fine. However, when I substitute run every 45 days for run every two weeks like this:
RUN EVERY 45 DAYS STARTING MAR 20TH 2020 PLUS 0 WORKDAYS
. . the result is that the literal number of days is used, and holidays and /or weekends are ignored. Is there a way to do this so that holidays and weekends are taken in to account? I have tried using GENTIME and I cannot seem to get that to work either.
Thanks in advance!