From owner-freebsd-questions@FreeBSD.ORG Thu Nov 3 20:55:58 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 9106F16A41F for ; Thu, 3 Nov 2005 20:55:58 +0000 (GMT) (envelope-from racerx@makeworld.com) Received: from makeworld.com (makeworld.com [216.201.118.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id 614B143D5E for ; Thu, 3 Nov 2005 20:55:52 +0000 (GMT) (envelope-from racerx@makeworld.com) Received: from localhost (localhost.com [127.0.0.1]) by makeworld.com (Postfix) with ESMTP id 822CE6103; Thu, 3 Nov 2005 14:55:51 -0600 (CST) Received: from makeworld.com ([127.0.0.1]) by localhost (makeworld.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 61984-05; Thu, 3 Nov 2005 14:55:48 -0600 (CST) Received: from [216.201.118.138] (racerx.makeworld.com [216.201.118.138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by makeworld.com (Postfix) with ESMTP id B566D60DA; Thu, 3 Nov 2005 14:55:46 -0600 (CST) Message-ID: <436A7956.9000000@makeworld.com> Date: Thu, 03 Nov 2005 14:55:50 -0600 From: Chris User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050930) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Alex Zbyslaw References: <000d01c5e0b3$ca250a00$6800a8c0@BrandonH> <436A773F.1070004@dial.pipex.com> In-Reply-To: <436A773F.1070004@dial.pipex.com> X-Enigmail-Version: 0.93.0.0 OpenPGP: id=C01BC363 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-2.3.3 (20050822) at makeworld.com - FreeBSD:The Power To Serve Cc: Brandon Hinesley , 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 Reply-To: RacerX@makeworld.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 20:55:58 -0000 Alex Zbyslaw wrote: > 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 Blah - I dont know where rsync lives - let's assume it lives in /usr/local/sbin - change the line in cron to: /usr/local/sbin/rsync -av --delete $files/$docs $dbkups/0/ -- Best regards, Chris Real programmers don't write in Pascal, Bliss, or Ada, or any of those pinko computer science languages. Strong typing is for people with weak memories.