Previous Topic: DAILY and ROLL OptionsNext Topic: Repeat Jobs


Schedule a Specific Day of the Month

To schedule a day-of-week to a day-of-month requires evaluation of the day-of-month and its relationship to the day-of-week. First, determine which occurrence for the day-of-month could be for the day-of-week. Next, schedule the job monthly for that week and day-of-week, and remove all days you would not want the job to execute during that week.

Business Value:

This best practice lets you schedule a day-of-week to day-of-month.

Additional Considerations:

The following are examples of scheduling a specific day of the month.

Example: Schedule a job for Sunday only if Sunday is the 7th of the month

First, you know if Sunday is the 7th of the month, it has to be the first Sunday of the month. Then the question is: What could the first Sunday of the month be and not be the 7th? It could be the 1st, 2nd, 3rd, 4th, 5th, or 6th. You schedule that as follows:

 __X__ MONTHLY JAN:X FEB:X MAR:X APR:X MAY:X JUN:X 
               JUL:X AUG:X SEP:X OCT:X NOV:X DEC:X
       WEEK:1 DAY-OF-WEEK:SUN 
       RDAY:/1,/2,/3,/4,/5,/6 

The calendar for this schedule should have seven days of the week available and have the SCHONLY option of N.

Example: Schedule a job for the 15th of the month only if it is a Wednesday

 __X__ MONTHLY JAN:X FEB:X MAR:X APR:X MAY:X JUN:X 
               JUL:X AUG:X SEP:X OCT:X NOV:X DEC:X 
       WEEK:3 DAY-OF-WEEK:WED 
       RDAY:/16,/17,/18,/19,/20,/21