Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 03 Nov 2005 20:46:55 +0000
From:      Alex Zbyslaw <xfb52@dial.pipex.com>
To:        Brandon Hinesley <brandonh@hotandcold.biz>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Cron Job will not run.
Message-ID:  <436A773F.1070004@dial.pipex.com>
In-Reply-To: <000d01c5e0b3$ca250a00$6800a8c0@BrandonH>
References:  <000d01c5e0b3$ca250a00$6800a8c0@BrandonH>

next in thread | previous in thread | raw e-mail | index | archive | help
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" folder
>is a file system on an external hard drive.  I am also using samba to share
>that folder as r/o.  
>[...]
>Here's part of my /etc/crontab:
>--------------------
>SHELL=/bin/sh
>PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin
>[...]
>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.

--Alex





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?436A773F.1070004>