[NTLUG:Discuss] freebsd pisses me off--SOLUTION
Jay Urish
jay at unixwolf.net
Wed Aug 12 16:25:21 CDT 2009
Stuart Johnston wrote:
> Jay Urish wrote:
>> Guys, I need some help.
>>
>> I am trying to kick off an rsync job from crontab on a freebsd box.
>> My entry in crontab looks like this:
>> 30 17 * * 1 root /etc/cronjobs/wednesday.backup
>>
>>
>> /etc/cronjobs/wednesday.backup contains this:
>>
>> #!/bin/sh
>> rsync -vau --stats --delete /mnt/rdl-pdc-D/
>> /mnt/daily/rdl-pdc/wednesday/ | /bin/sendEmail -f nas at rdlsupply.com -t
>> jurish at rdlsupply.com -u "Wednesday backup" -s mail.rdlsupply.com
>>> /dev/null &
>> I can kick it off from the command line and it works great!
>> The complaint? When cron kicks it off, all I get is an empty email and
>> rsync dies.
>>
>>
>> I don't get it..
>>
>> Does anybody have any suggestions?
>
> Have you tried specifying the full path of the rsync command in your
> script? Cron will often clean out your ENV so you might loose your PATH.
>
> Take of the /dev/null redirect so cron will send you errors.
>
> You probably don't want to background the process for running under cron?
That did it!!! All I had to do was feed the absolute path to rsync and
viola!!!
Thanks!!!
More information about the Discuss
mailing list