Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Sep 1999 15:52:31 -0500
From:      Dan Nelson <dnelson@emsphone.com>
To:        Robin Huiser <listmail@node10c55.a2000.nl>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Cron keeps bugging me...
Message-ID:  <19990917155231.A61093@dan.emsphone.com>
In-Reply-To: <199909171952.VAA43872@node10c55.a2000.nl>
References:  <199909171952.VAA43872@node10c55.a2000.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Sep 17), Robin Huiser said:
> What mistake did I make when editing crontab (as root I entered:
> crontab -e).
> 
> This is the output of crontab -l (for user root):
> 
> # DO NOT EDIT THIS FILE - edit the master and reinstall.
> # (/tmp/crontab.oejOt28320 installed on Mon Sep 13 11:53:08 1999)
> # (Cron version -- $Id: crontab.c,v 1.11 1997/09/15 06:39:15 charnier Exp $)
> # /etc/crontab - root's crontab for FreeBSD
> #
> # $Id: crontab,v 1.18 1998/03/30 09:17:25 ache 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

Aha.  There is a difference between the "crontab for root" and the
"system crontab".  The system crontab has an extra field (the "who"
field) that tells cron what user to run the job as.  The system crontab
lives in /etc/crontab and is not edited via the "crontab -e" command. 
You simply edit /etc/crontab.

I don't know how you managed to get the system crontab into the crontab
for the root user, but put it back into /etc/crontab where it belongs :)
The crontab for the root user is usually empty.

-- 
	Dan Nelson
	dnelson@emsphone.com


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?19990917155231.A61093>