Link to home
Start Free TrialLog in
Avatar of maryannh033100
maryannh033100

asked on

Run Crontab based on Business Days

I know you can select a day of month range in your crontab file; 1-31, but I need to execute a job the first 8 business days of the month, every month.  Can this be done?
Avatar of ozo
ozo
Flag of United States of America image

Have crontab call a program on the first 14 days of the month, which checks a business calendar to execute the job.
Avatar of maryannh033100
maryannh033100

ASKER

Edited text of question.
cron itself doesn't know about business days, but it can call a program that does.
e.g. a perl program using the function &DateCalc("1st","+8 business days") in the Date::Manip module, with a config file to set your holidays
Edited text of question.
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Comment accepted as answer