Cron Job will not run.
brandonh at hotandcold.biz
Thu Nov 3 20:59:59 GMT 2005
I forgot to mention that I've already tried giving the absolute path to
every executable mentioned in the script, but to no avail.
From: Chris [mailto:racerx at makeworld.com]
Sent: Thursday, November 03, 2005 12:56 PM
To: Alex Zbyslaw
Cc: Brandon Hinesley; freebsd-questions at freebsd.org
Subject: Re: Cron Job will not run.
Alex Zbyslaw wrote:
> Brandon Hinesley wrote:
>> The script below works perfectly when I run it from a console, however,
>> nothing at all seems to happen as evidenced by the backups not being
>> rotated. I don't know if this makes a difference, but the "Backup"
>> is a file system on an external hard drive. I am also using samba to
>> that folder as r/o. [...]
>> Here's part of my /etc/crontab:
>> rsync -av --delete $files/$docs $dbkups/0/
> This is a FAQ, though I don't know if it's in the FAQ :-)
> From the command line /usr/local/bin (where rsync lives) is in your
> path. From Cron it is not. Either add it to the crontab or set PATH in
> your script. The latter is recommended since the script works whatever
> the running user has their path set to. There may be some other path
> problem I've missed, but this ones sticks out.
Blah - I dont know where rsync lives - let's assume it lives in
/usr/local/sbin - change the line in cron to:
/usr/local/sbin/rsync -av --delete $files/$docs $dbkups/0/
Real programmers don't write in Pascal, Bliss, or Ada, or
any of those pinko computer science languages. Strong
typing is for people with weak memories.
More information about the freebsd-questions