[Techtalk] Cron problem
Dominik Schramm
dominik.schramm at gmxpro.net
Fri Mar 11 04:20:48 EST 2005
Hi,
Lucky Lady <needlesschatter at yahoo.com> writes:
> [...]
> 0 23 1-5 * * /bin/cp-allfiles.sh>>/root/mycronlog.
>
> It is my understanding that Monday through and
> including Friday evening at 11:30 pm the script will
> be run, and the output will be in mycronlog. This
> worked fine for a few days then stopped. Facts:
Let me guess, did it work at the beginning of March?
You entered 1-5 into the wrong field. A crontab is made up of the
following fields (in this order):
minutes hour dayofmonth month dayofweek command
So:
0 23 1-5 * * asdf
means "at 23:00 every month on the 1st through 5th, no matter what the
weekday".
Judging from your description, this is what you meant:
minutes hour dayofmonth month dayofweek command
0 23 * * 1-5 asdf
meaning "at 23:00 every Monday through Friday, no matter what month
and day of month".
hope this helps,
dominik
More information about the Techtalk
mailing list