[ALUG] Setting Crons on FreeBSD

Andreas Tauscher ta at geuka.net
Wed Aug 5 14:07:43 EAT 2015


Have you checked the mails for root?
Output of the script you will not find in the logfile it is sent by mail.
If there are no mails then set MAILTO=root in the crontab.

Next if a script is running from a interactive shell does not mean it
will run as cron job. The environment might be different.
When you test the script set the environment identical to cron's
So run as root (or what ever user you set in crontab)
env -i SHELL=<from /etc/contab> PATH=<from /etc/contab> HOME=<user home>
LOGIN=<login name> /etc/rsync.sh


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.habari.co.tz/pipermail/linux/attachments/20150805/98f798d9/attachment.pgp>


More information about the Linux mailing list