Re: Executing cronjob on every first business day of the month
- From: aryzhov@xxxxxxxxx
- Date: 1 Sep 2006 10:41:10 -0700
martin.witte@xxxxxxxxx wrote:
afaik you can't do this in cron, I would start my script by checking
the result of date +%a, when thats Sat or Sun I would exit the script
Then, if the first day is Sun or Sat, the script never runs this month.
One option is to reschedule the job to Monday,
if the first day of month falls on weekend.
for instance:
30 7 1 * * date +%a | egrep -qs '^S' && echo Script | at now Monday ||
Script
but... what about national holidays?
.
- References:
- Executing cronjob on every first business day of the month
- From: Meeaz
- Re: Executing cronjob on every first business day of the month
- From: martin.witte@xxxxxxxxx
- Executing cronjob on every first business day of the month
- Prev by Date: Re: Quit after certain paragraph
- Next by Date: Re: Quit after certain paragraph
- Previous by thread: Re: Executing cronjob on every first business day of the month
- Next by thread: Re: Executing cronjob on every first business day of the month
- Index(es):
Relevant Pages
|