From owner-freebsd-questions@FreeBSD.ORG Thu Nov 3 20:47:00 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D6B1B16A420 for ; Thu, 3 Nov 2005 20:47:00 +0000 (GMT) (envelope-from xfb52@dial.pipex.com) Received: from smtp-out4.blueyonder.co.uk (smtp-out4.blueyonder.co.uk [195.188.213.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F02B43D46 for ; Thu, 3 Nov 2005 20:46:59 +0000 (GMT) (envelope-from xfb52@dial.pipex.com) Received: from [82.41.253.228] ([82.41.253.228]) by smtp-out4.blueyonder.co.uk with Microsoft SMTPSVC(5.0.2195.6713); Thu, 3 Nov 2005 20:47:50 +0000 Message-ID: <436A773F.1070004@dial.pipex.com> Date: Thu, 03 Nov 2005 20:46:55 +0000 From: Alex Zbyslaw User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-GB; rv:1.7.12) Gecko/20051030 X-Accept-Language: en-us, pl MIME-Version: 1.0 To: Brandon Hinesley References: <000d01c5e0b3$ca250a00$6800a8c0@BrandonH> In-Reply-To: <000d01c5e0b3$ca250a00$6800a8c0@BrandonH> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 03 Nov 2005 20:47:50.0243 (UTC) FILETIME=[DAAE7330:01C5E0B7] Cc: freebsd-questions@freebsd.org Subject: Re: Cron Job will not run. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 20:47:01 -0000 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