Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Mar 2001 15:58:47 -0500
From:      Bill Moran <wmoran@iowna.com>
To:        Cary <scattered@babel.acu.edu>
Cc:        freebsd-questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: cron problems, II - :)
Message-ID:  <3ABFAD86.D824CD78@iowna.com>
References:  <Pine.LNX.4.10.10103261401530.20598-100000@babel.acu.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
You've got a user crontab being used as the system crontab. The system
has a main crontab, and then each user can have his/her own crontab. The
difference in format is that the system crontab doesn't need the "who"
field (because everything runs as root) so the 6th field is expected to
be the command to run, which it thinks is "root", the 7th field is then
ignored. So instead of running atrun every 5 minutes (which actually
executes commands in the user crontab - man atrun) it attempts to
execute the nonexistant command "root"
The easy solution is to go through the file and remove all the "root"
fields.

-Bill

Cary wrote:
> 
> Sorry, I problably should have attached my crontab also! Stupid me.
> Thanks to Chris Smith for pointing this out to me.
> 
> --------/etc/crontab---------------------------------------
> # /etc/crontab - root's crontab for FreeBSD
> #
> # $FreeBSD: src/etc/crontab,v 1.21.2.3 2000/12/08 10:56:07 obrien Exp $
> #
> SHELL=/bin/sh
> PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
> HOME=/var/log
> #
> #minute hour    mday    month   wday    who     command
> #
> */5     *       *       *       *       root    /usr/libexec/atrun
> #
> # rotate log files every hour, if necessary
> 0       *       *       *       *       root    newsyslog
> #
> # do daily/weekly/monthly maintenance
> 1       3       *       *       *       root    periodic daily
> 15      4       *       *       6       root    periodic weekly
> 30      5       1       *       *       root    periodic monthly
> #
> # time zone change adjustment for wall cmos clock,
> # does nothing, if you have UTC cmos clock.
> # See adjkerntz(8) for details.
> 1,31    0-5     *       *       *       root    adjkerntz -a
> # start ntpd on startup
> @reboot                                 root    /usr/local/bin/ntpd
> 
> ---------------EOF------------------------------------

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3ABFAD86.D824CD78>