Re: weird cron problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]





Andreas Kuntzagk wrote:
PATHS - everytime i have cron issues its a PATH problem. The cron env is not the same as the user when logged in

Thanks, that's probably the cause. rsnapshot resides in /usr/local/bin
I changed the PATH in /etc/crontab now. Silly that I didn't see it.
So jobs in /etc/crontab are executed with the PATH in there, but jobs in
roots crontab are executed with the PATH set in .bashrc?

Andreas
You can prove to yourself quite easily that $PATH gets manipulated. Simply make a crontab entry like this in root's crontab:

* * * * * echo $PATH >> /root/cronpath

and compare the entries in the resulting file with the command line output of
# echo $PATH

(Don't forget to remove that crontab entry when finished playing.)


_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux