Date: Tue, 08 Mar 2011 22:42:57 +0100 From: "Julian H. Stacey" <jhs@berklix.com> To: Charles Hatvany <charles@hatvany.com> Cc: freebsd-isp@freebsd.org Subject: Re: Rsync in cron job fails to function Message-ID: <201103082143.p28Lgv4Q087786@fire.js.berklix.net> In-Reply-To: Your message "Tue, 08 Mar 2011 15:52:16 EST." <4D769700.2070309@hatvany.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, Reference: > From: Charles Hatvany <charles@hatvany.com> > Date: Tue, 08 Mar 2011 15:52:16 -0500 > Message-id: <4D769700.2070309@hatvany.com> Charles Hatvany wrote: > Hi, > > I am not sure if there is a better place to ask this question. I have a > shell script (single line): > > rsync -avz -e "ssh -i /root/cron/web-rsync-key" /usr/home/ > root@10.0.0.232:/usr/home > /etc/rsync/output > > which works fine if I run it from a prompt as: > > /etc/rsync/sync > > and produces output as expected to file /etc/rsync/output. > > crontab contains (single line): > > 0,10,20,30,40,50 * * * * root /etc/rsync/sync > > Cron log shows: > > Mar 7 15:40:02 web /usr/sbin/cron[66012]: (root) CMD (/etc/rsync/sync) > > BUT, output contains nothing (assuming I reset it to that before cron > executes the job. > > Any ideas or a better place to ask this or a way to debug it? Cron I recall does not have /usr/local/bin in path ?. Try either /usr/local/bin/rsync or add local to PATH Cheers, Julian -- Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com Mail plain text; Not quoted-printable, Not HTML, Not base 64. Reply below text sections not at top, to avoid breaking cumulative context.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103082143.p28Lgv4Q087786>