[KLUG Members] Cron

Bruce Smith members@kalamazoolinux.org
12 Sep 2003 20:39:52 -0400


> I have used
> crontab to put two different jobs in and neither will execute.
> 
> 12 1 * * * rsync -rtpl -e ssh --delete /home/shared/work -->
>       user@Way:/home/user/work (this is a single line command)
> 58 1 * * * /bin/cron_mailtest
> 
> These have been placed as a user and as root.  Neither work.
> After each adjustment to the crontab, cron was restarted.

It is not necessary to restart cron after changing crontab(s).
(although make sure cron is running in the first place.

> Both the command and script work if manually typed in the command line.

Anything interesting in /var/log/cron ?

Also, be aware your environment in cron is NOT the same as when you're
logged in.  Especially the $PATH variable is different (minimal), so
cron may not be able to find certain commands.

--------------------------------------------
Bruce Smith                bruce@armintl.com
System Administrator / Network Administrator
Armstrong International, Inc.
Three Rivers, Michigan  49093  USA
http://www.armstrong-intl.com/
--------------------------------------------