From owner-freebsd-questions@FreeBSD.ORG Sun Nov 9 12:36:41 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 497BC1065687 for ; Sun, 9 Nov 2008 12:36:41 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA09.emeryville.ca.mail.comcast.net (qmta09.emeryville.ca.mail.comcast.net [76.96.30.96]) by mx1.freebsd.org (Postfix) with ESMTP id 2EAA78FC1D for ; Sun, 9 Nov 2008 12:36:41 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA02.emeryville.ca.mail.comcast.net ([76.96.30.19]) by QMTA09.emeryville.ca.mail.comcast.net with comcast id d0b81a0030QkzPwA90cgGN; Sun, 09 Nov 2008 12:36:40 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA02.emeryville.ca.mail.comcast.net with comcast id d0cg1a0032P6wsM8N0cgcK; Sun, 09 Nov 2008 12:36:40 +0000 X-Authority-Analysis: ?? Received: by icarus.home.lan (Postfix, from userid 1000) id 0CCF85C19; Sun, 9 Nov 2008 04:36:40 -0800 (PST) Date: Sun, 9 Nov 2008 04:36:40 -0800 From: Jeremy Chadwick To: "Michael P. Soulier" Message-ID: <20081109123640.GA39105@icarus.home.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-questions Subject: Re: debugging cronjobs not running 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: Sun, 09 Nov 2008 12:36:41 -0000 On Sun, Nov 09, 2008 at 06:57:10AM -0500, Michael P. Soulier wrote: > So, I'm running cron in debug mode, and I do see things like this > about my crontab. I'm not sure why you sent this to me directly, but I do appreciate you CC'ing the mailing lists. :-) > load_entry()...returning successfully > load_env, read <*/5 * * * * cacti /usr/local/bin/php > /usr/local/share/cacti/poller.php 1>/dev/null 2>&1> > load_env, parse error, state = 7 > > but that parse_error line is the same for many links that do seem to > be run properly. I have no familiarity with the internals of cron, so I have no idea what "parse error" implies, nor "state = 7". > The symptoms I'm seeing is some cronjobs, specifically weekly ones, > not running as expected. Plus, I used to get email from the nightly > runs of periodic, and now I don't see anything. I know some jobs > aren't running because they produce files as output and I'm not seeing > them. That, or they're simply running unsuccessfully. > > One thing I noticed is that "man 5 crontab" seems to make no mention > of the "user" field used in /etc/crontab, but that's likely just a > documentation error. That's because /etc/crontab is not crontab(5). See cron(8) for mentions of the "system-level crontab". Please file a PR on the documentation confusion so it can get fixed/addressed. > Has anyone ever configured cronjobs that just didn't run, or you > didn't get mail for them like you should have? No, this has never happened to me, or on any of the systems I've administrated. It might be worthwhile using "crontab -e -u " and see if those crontabs reliably work for you. If so, then the problem is likely with the system-level crontab and not with user-level crontabs. Before doing this, be sure to note what security/pam checks get applied to user-level crontabs vs. system-level crontabs. This is documented in cron(8). You might have to change shells of some accounts on your system to get user-level crontabs to work for those accounts. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |