From owner-freebsd-isp@FreeBSD.ORG Wed Mar 9 00:10:37 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 1F697106566C for ; Wed, 9 Mar 2011 00:10:37 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id DB71E8FC08 for ; Wed, 9 Mar 2011 00:10:35 +0000 (UTC) Received: by iwn33 with SMTP id 33so3172iwn.13 for ; Tue, 08 Mar 2011 16:10:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=hAa9GBaA6Cx3+TG50QL01Ukwkr9YTK1QObuCXpPAx+I=; b=ndFT7BZeGSgxWaO26cHBQy9ZhhLkuJYLXTOFXX976IbbBxD8v3cPUee2D2739yUINB aw5OlyJQAy2/DAjxKC1LOZivoH0IsMNOwgnWHU4U/nXoTRCb4sotFwLLmXbwM7cooXit 3SYHQYJz64+D0+zApx9Tmyy2pgjpblbjE/3u0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=oqrX4xbn5EAV/kOyHGCPXIEPBanrRbB1PjXRzgRGqkq39wqyZUd3kwXvTz5tx1tLTb An9wWZBanAvzx7BIKkJBjtke+uTZTTwr3CIjqViASAgt1c9esrvPKMBWHqPaKV/RYUEG ewkS+PJhbM/281jthPuvLIjbCMXIWiupvBLpQ= MIME-Version: 1.0 Received: by 10.231.197.27 with SMTP id ei27mr125327ibb.198.1299627711646; Tue, 08 Mar 2011 15:41:51 -0800 (PST) Received: by 10.231.167.194 with HTTP; Tue, 8 Mar 2011 15:41:51 -0800 (PST) In-Reply-To: <4D758AA2.1090000@hatvany.com> References: <4D758AA2.1090000@hatvany.com> Date: Tue, 8 Mar 2011 15:41:51 -0800 Message-ID: From: Xin LI To: Charles Hatvany Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Wed, 09 Mar 2011 00:10:37 -0000 On Mon, Mar 7, 2011 at 5:47 PM, Charles Hatvany 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 http://www.delphij.net