Schedule a JOB in ESP Monday to Friday (excluding holidays)
search cancel

Schedule a JOB in ESP Monday to Friday (excluding holidays)

book

Article ID: 202460

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

Need to schedule a job Mon-Fri ( excluding national holidays) at 10AM between 1st Sunday of October & 1st Sunday of April & at 11AM between 1st Sunday of April & 1st Sunday of October to cater to AEST daylight saving changes.

Further, this needs to be specified within the PROC itself since it isn't feasible to specify it at the event level (in this particular instance)

 

Environment

Release: ALL

Component: ESP WORKLOAD AUTOMATION

Resolution

Use the DAYS_BETWEEN function.

Here is an example:

JOB TEST
RUN WORKDAY
/* following check if today is between the two specific Sundays*/
IF DAYS_BETWEEN('1ST SUNDAY OF APRIL','TODAY') > 0 -
AND DAYS_BETWEEN('TODAY','1ST SUNDAY OF OCTOBER') > 0 THEN -
DELAYSUB 11AM
ELSE DELAYSUB 10AM
ENDJOB

Note:
1. Assuming Mon-Fri are defined as WORKDAYS on the calendar definition. It will show on "LISTCAL calendar_name" or specified on WORKDAYS in ESPPARM; if neither shows up, the default will be Mon-Fri.

2. Set AEST time zone to be automatically adjusted.
Here is an example that can be defined in ESPPARM:

Example: Define automatic time zone adjustment,
The following example shows a time zone with defined automatic adjustment.
The adjustment to DST will happen at 2:00 AM every last Sunday of March and it will shift back from DST at 3:00 AM every last Sunday of October. |
TIMEZONE 20 CET 1E DSTON(2:00 LAST SUNDAY OF MARCH) -
DSTOFF(3:00 LAST SUNDAY OF OCTOBER)

Additional Information

For full details, see online documentation ESP Workload Automation below:
Job and Workload Functions