From owner-freebsd-isp@FreeBSD.ORG Tue Mar 8 22:01:52 2011 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C1371065675 for ; Tue, 8 Mar 2011 22:01:52 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from tower.berklix.org (tower.berklix.org [83.236.223.114]) by mx1.freebsd.org (Postfix) with ESMTP id EB4C58FC08 for ; Tue, 8 Mar 2011 22:01:51 +0000 (UTC) Received: from park.js.berklix.net (p5B22E3DF.dip.t-dialin.net [91.34.227.223]) (authenticated bits=0) by tower.berklix.org (8.14.2/8.14.2) with ESMTP id p28LhCHA021017; Tue, 8 Mar 2011 21:43:14 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by park.js.berklix.net (8.13.8/8.13.8) with ESMTP id p28Lh7iA087432; Tue, 8 Mar 2011 22:43:07 +0100 (CET) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.3/8.14.3) with ESMTP id p28Lgv4Q087786; Tue, 8 Mar 2011 22:43:02 +0100 (CET) (envelope-from jhs@fire.js.berklix.net) Message-Id: <201103082143.p28Lgv4Q087786@fire.js.berklix.net> To: Charles Hatvany From: "Julian H. Stacey" Organization: http://www.berklix.com BSD Unix Linux Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://www.berklix.com/free/ X-URL: http://www.berklix.com In-reply-to: Your message "Tue, 08 Mar 2011 15:52:16 EST." <4D769700.2070309@hatvany.com> Date: Tue, 08 Mar 2011 22:42:57 +0100 Sender: jhs@berklix.com Cc: freebsd-isp@freebsd.org Subject: Re: Rsync in cron job fails to function X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2011 22:01:52 -0000 Hi, Reference: > From: Charles Hatvany > 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.