From owner-freebsd-questions@FreeBSD.ORG Thu Nov 3 21:06:40 2005 Return-Path: X-Original-To: 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 C5B3416A42D for ; Thu, 3 Nov 2005 21:06:40 +0000 (GMT) (envelope-from nvidican@wmptl.com) Received: from wmptl.net (fw1.wmptl.com [216.8.159.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5184343D45 for ; Thu, 3 Nov 2005 21:06:40 +0000 (GMT) (envelope-from nvidican@wmptl.com) Received: from [10.0.0.104] (r3140ca.wmptl.net [10.0.0.104]) by wmptl.net (8.13.1/8.13.1) with ESMTP id jA3L6ddO086385; Thu, 3 Nov 2005 16:06:39 -0500 (EST) (envelope-from nvidican@wmptl.com) Message-ID: <436A7BDE.6000308@wmptl.com> Date: Thu, 03 Nov 2005 16:06:38 -0500 From: Nathan Vidican User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Brandon Hinesley References: <001001c5e0b9$af64fd50$6800a8c0@BrandonH> In-Reply-To: <001001c5e0b9$af64fd50$6800a8c0@BrandonH> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.111 () RATWR10_MESSID X-Scanned-By: MIMEDefang 2.44 Cc: 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 21:06:41 -0000 May be a really dumb question here, but like all technical problems, start with the simple stuff: ps ax | grep cron ???? Is cron even running? -- Nathan Vidican nvidican@wmptl.com Windsor Match Plate & Tool Ltd. http://www.wmptl.com/ Brandon Hinesley wrote: > I forgot to mention that I've already tried giving the absolute path to > every executable mentioned in the script, but to no avail. > > -----Original Message----- > From: Chris [mailto:racerx@makeworld.com] > Sent: Thursday, November 03, 2005 12:56 PM > To: Alex Zbyslaw > Cc: Brandon Hinesley; freebsd-questions@freebsd.org > Subject: Re: Cron Job will not run. > > 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/ > >