James Talvy
asked on
UNIX Crontab running when not scheduled
I would like for a cron to run at 9 am Monday-Friday IF it is the 25th->31st of the month so I put in the following crontab:
0 9 25-31 * 1-5 date >> /home/jamtal/datelog.txt
The problem is that it runs at 9am Monday->Friday reguardless of the day of the month...
Is this a known bug in crontab? I can't find any reference in the crontab manuals that this is an OR condition when other times it is an AND.
I have tried this on a Redhat Linux and Solaris system with the same result.
Thanks
0 9 25-31 * 1-5 date >> /home/jamtal/datelog.txt
The problem is that it runs at 9am Monday->Friday reguardless of the day of the month...
Is this a known bug in crontab? I can't find any reference in the crontab manuals that this is an OR condition when other times it is an AND.
I have tried this on a Redhat Linux and Solaris system with the same result.
Thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I guess I can wrap it in a shell script that checks for the day of week and exits if it is the weekend.