From owner-freebsd-questions@FreeBSD.ORG Wed Apr 9 09:02:04 2003 Return-Path: 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 C9D6737B401 for ; Wed, 9 Apr 2003 09:02:04 -0700 (PDT) Received: from pa-plum1b-166.pit.adelphia.net (pa-plum1b-122.pit.adelphia.net [24.53.161.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA82E43F85 for ; Wed, 9 Apr 2003 09:02:03 -0700 (PDT) (envelope-from wmoran@potentialtech.com) Received: from potentialtech.com (working [172.16.0.95]) h39G0mJP013768; Wed, 9 Apr 2003 12:00:49 -0400 (EDT) (envelope-from wmoran@potentialtech.com) Message-ID: <3E9448BA.1000700@potentialtech.com> Date: Wed, 09 Apr 2003 12:22:18 -0400 From: Bill Moran User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.2.1) Gecko/20030301 X-Accept-Language: en-us, en MIME-Version: 1.0 To: mbettinger@championelevators.com References: <200304091011.16805.mbettinger@championelevators.com> In-Reply-To: <200304091011.16805.mbettinger@championelevators.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: cron stopped working X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2003 16:02:05 -0000 Matthew Bettinger wrote: > Hello, > > I have the following crontab entry for root: > via crontab -e > > SHELL=/bin/sh > PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin > HOME=/var/log > #======================================================== > # Crontab entries to execute flexbackup to dump /depot /general /usr /var > # on specified days. Level 0 (full) on Wed @ midnight and Incrementals > # every other day at midnight -M.Bettinger 9.17.02 > #======================================================== > 55 23 * * 3 root /usr/local/bin/flexbackup -fs all -level 0 > 55 23 * * 4 root /usr/local/bin/flexbackup -fs all -level 1 > 55 23 * * 5 root /usr/local/bin/flexbackup -fs all -level 2 > 55 23 * * 6 root /usr/local/bin/flexbackup -fs all -level 3 > 56 23 * * 0 root /usr/local/bin/flexbackup -fs all -level 4 > 55 23 * * 1 root /usr/local/bin/flexbackup -fs all -level 5 > 55 23 * * 2 root /usr/local/bin/flexbackup -fs all -level 6 > > This is sopposed to run a backup script at night however it appears to not be > working, or is it? In /var/log/cron shows : Could we see the flexbackup script? My first guess is that you're relying on shell variables (such as path) to be set in the flexbackup script, and they're not, thus the script is failing. Why not alter the flexbackup script to produce some output that will help you debug the problem? > Apr 8 13:08:00 tester /usr/sbin/cron[75516]: (root) CMD (root /usr/local/bin/ > flexbackup -fs all -level 6) > > If i cut and paste the exact command in sh shell it works. > > System info... > > tester# uname -a > FreeBSD tester.championelevators.com 4.7-STABLE FreeBSD 4.7-STABLE #0: Thu Dec > 5 21:58:26 CST 2002 > root@tester.championelevators.com:/general/obj/usr/src/sys/GENERIC i386 > tester# uptime > 10:15AM up 121 days, 1:06, 1 user, load averages: 0.35, 0.09, 0.03 > > ps displays that cron is running. > > root 115 0.0 0.4 1028 448 ?? Is 9Dec02 1:48.07 /usr/sbin/cron -- Bill Moran Potential Technologies http://www.potentialtech.com