Is there any way to schedule a job the 6th working day of each month.
thanks
6th working day
Moderators: JRL, Dorian (MJT support)
Yeah, use this logic.
Have the script run every day, and let the script itself check if it's the 6th day:
If it's the 8th, 9th, or 10th of the month, continue (else end script)
Check the day of the week:
If it's the 8th, then:
- Saturday or Sunday, end script
- (Any other day = 6th working day of month)
If it's the 9th, then:
- Monday, it's the 6th day.
- else end script
If it's the 10th, then:
- Monday, it's the 6th day.
- else end script.
Have the script run every day, and let the script itself check if it's the 6th day:
If it's the 8th, 9th, or 10th of the month, continue (else end script)
Check the day of the week:
If it's the 8th, then:
- Saturday or Sunday, end script
- (Any other day = 6th working day of month)
If it's the 9th, then:
- Monday, it's the 6th day.
- else end script
If it's the 10th, then:
- Monday, it's the 6th day.
- else end script.
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Captive's logic is good, but many holidays fall on Mondays now, and usually upsets "workday" calculations.
Could also make an INI file listing the first workday of each month. Based on run date, look up key value for that year/month. If same date, go to work, if different date, take the day off. Example assumes workdays are Mon-Fri.
Example INI file:

Example INI file:
[2004]
Jan=8
Feb=11
Mar=10
...
...
Dec=8
[2005]
Jan=10
Feb=8
...
...
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!