Walter Hurry <[email protected]> wrote: > > As the subject says, this is probably a newbie question (I am new to > FreeBSD but quite experienced at Linux). > > FreeBSD9 on x86_64. > > Cron is running: > > $ ps -ax|grep cron > > 1513 ?? Is 0:00.01 /usr/sbin/cron -s > > 2283 0 S+ 0:00.00 grep cron > > $ > > I have a syntactically valid crontab:
'Syntactically valid', yes, but I believe "it does not mean what you think it does" applies. more below. > $ crontab -l > #min hr dom month dow command > > SHELL=/bin/bash > > PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/ > daddy/bin > > HOME=/home/walterh > > 00 02 * * * /home/walterh/exports.sh > > 05 02 * * * /home/walterh/backup_etc.sh > > 10 02 * * * /home/walterh/systemcheck.sh > > 15 02 * * * /home/walterh/backup_bsd.sh > > $ > > So what is wrong? Why is nothing happening? I have consulted the handbook > but see nothing. It _appears_ that there is whitespace _before_ the purporte 'minutes' value on each line that you intend to invoke a command. If so, -THAT- is probably what is causinng the unexpected behavior. I believe cron is looking for the 'minutes' value _before_ any white space, and using a value of '0' when it finds 'nothing' before the white-space Field-separator. That, thus, the all the commands run at 'zero minutes' past the various hours, on the -second- day of the month, and that command-line that cron would -attempt- to execute on the 2nd looks like, "* /home/walterh/systemcheck.sh", which, of course will have *wildly* unexpected results, epecially if the first element of the '*' expansion _is_ marked as executable. Remove the leading white-space and things should work the way you 'expect'. Comment: using a leading zero on the numeric fields is a BAD IDEA(tm) -- you are *strongly* encocuraged to remove them. Yes, that means numbers will not be column aligned, but it is a small price to pay to avoid the hair-tearing that =will= ensue when using it bites you. _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[email protected]"
