From owner-freebsd-questions@FreeBSD.ORG Thu Nov 3 20:59:59 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 5B50516A420 for ; Thu, 3 Nov 2005 20:59:59 +0000 (GMT) (envelope-from brandonh@hotandcold.biz) Received: from mail.themarcomgroup.com (207-114-172-156.gen.twtelecom.net [207.114.172.156]) by mx1.FreeBSD.org (Postfix) with SMTP id 7ED1243D6D for ; Thu, 3 Nov 2005 20:59:56 +0000 (GMT) (envelope-from brandonh@hotandcold.biz) Received: (qmail 18562 invoked from network); 3 Nov 2005 20:59:53 -0000 Received: from adsl-71-132-117-69.dsl.bkfd14.pacbell.net (HELO BrandonH) (71.132.117.69) by mail.themarcomgroup.com with SMTP; 3 Nov 2005 20:59:53 -0000 From: "Brandon Hinesley" To: Date: Thu, 3 Nov 2005 13:00:56 -0800 Organization: Advanced Mechanical Systems, Inc. Message-ID: <001001c5e0b9$af64fd50$6800a8c0@BrandonH> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcXguPnUy7wJ8MNkTDq0gizhdwcRZAAAIMgQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: <436A7956.9000000@makeworld.com> 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:59:59 -0000 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/ -- 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.