Date: Tue, 8 Mar 2011 15:41:51 -0800 From: Xin LI <delphij@gmail.com> To: Charles Hatvany <charles@hatvany.com> Cc: freebsd-isp@freebsd.org Subject: Re: Rsync in cron job fails to function Message-ID: <AANLkTikMag38y6LAhiv=7NSC2wRvdW8DutwO2=uu0VWC@mail.gmail.com> In-Reply-To: <4D758AA2.1090000@hatvany.com> References: <4D758AA2.1090000@hatvany.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 7, 2011 at 5:47 PM, Charles Hatvany <charles@hatvany.com> wrote= : > Hi, > > I am not sure if there is a better place to ask this question. =C2=A0I ha= ve 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 =C2=A0 =C2=A0 =C2=A0 =C2=A0* =C2=A0 =C2=A0 =C2=A0 * =C2= =A0 =C2=A0 =C2=A0 * =C2=A0 =C2=A0 =C2=A0 * =C2=A0 =C2=A0 =C2=A0 root /etc/r= sync/sync > > Cron log shows: > > Mar =C2=A07 15:40:02 web /usr/sbin/cron[66012]: (root) CMD (/etc/rsync/sy= nc) > > 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? Common problem would be rsync is not in $PATH and you didn't specified full path. Try either adding it into PATH on the crontab, or using full path and see if that helps? Cheers, --=20 Xin LI <delphij@delphij.net> http://www.delphij.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikMag38y6LAhiv=7NSC2wRvdW8DutwO2=uu0VWC>