From owner-freebsd-doc Wed Feb 28 7:40: 9 2001 Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 9DEC037B71B for ; Wed, 28 Feb 2001 07:40:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f1SFe1k53949; Wed, 28 Feb 2001 07:40:01 -0800 (PST) (envelope-from gnats) Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id 449E637B71A for ; Wed, 28 Feb 2001 07:30:50 -0800 (PST) (envelope-from mwm@mired.org) Received: (qmail 36458 invoked by uid 100); 28 Feb 2001 15:30:49 -0000 Message-Id: <20010228153049.36457.qmail@guru.mired.org> Date: 28 Feb 2001 15:30:49 -0000 From: mwm@mired.org Reply-To: mwm@mired.org To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: docs/25456: [PATCH] root-not-found-cron-error is slightly out of date. Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 25456 >Category: docs >Synopsis: [PATCH] root-not-found-cron-error is slightly out of date. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Wed Feb 28 07:40:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Mike Meyer >Release: FreeBSD 4.2-STABLE i386 >Organization: Meyer Consulting >Environment: The FreeBSD FAQ, on 4.x-STABLE >Description: The FAQ entry on dealing with root errors after mangling crontab is slightly out of date. In particular, it suggests just removing the crontab file, instead of the (slightly more correct) -r option to crontab. Personally, I feel that people should be using the periodic mechanism for daily/weekly/monthly tasks instead of cron anyway. >How-To-Repeat: Read the FAQ and the crontab man page. >Fix: Here's a patch to the faq's book.sgml that replaces the suggestion to delete the file with one to use "crontab -r". It also adds a paragraph recommending periodic for daily/weekly/monthly tasks, along with a pointer to the man pages. - If this is what you did, you should delete the - /var/cron/tabs/root, since it will - simply be a copy of /etc/crontab, - in the wrong format. Next time, when you edit - /etc/crontab, you should not do - anything to inform &man.cron.8; of the changes, since it - will notice them automatically. + If this is what you did, the extra crontab is simply a + copy of /etc/crontab in the wrong + format it. Delete it with the command: + + &prompt.root; crontab + + Next time, when you edit + /etc/crontab, you should not do + anything to inform &man.cron.8; of the changes, since it + will notice them automatically. + + If you want something to be run once per day, week, or + month, it's probably better to add shell scripts + /usr/local/etc/periodic, and let the + &man.periodic.8; command run from the system cron schedule + it with the other periodic system tasks. The actual reason for the error is that the system crontab has an extra field, specifying which user to run the >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message