Date: Sun, 9 Nov 2008 04:36:40 -0800 From: Jeremy Chadwick <koitsu@FreeBSD.org> To: "Michael P. Soulier" <msoulier@digitaltorque.ca> Cc: freebsd-questions <freebsd-questions@freebsd.org> Subject: Re: debugging cronjobs not running Message-ID: <20081109123640.GA39105@icarus.home.lan> In-Reply-To: <fb6605670811090357i7223fa23h4bf6cab5bb3b3da3@mail.gmail.com> References: <fb6605670811090357i7223fa23h4bf6cab5bb3b3da3@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <user>" 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 |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081109123640.GA39105>