Skip site navigation (1)Skip section navigation (2)
Date:      28 Feb 2001 15:30:49 -0000
From:      mwm@mired.org
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   docs/25456: [PATCH] root-not-found-cron-error is slightly out of date.
Message-ID:  <20010228153049.36457.qmail@guru.mired.org>

next in thread | raw e-mail | index | archive | help

>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.

	<mike

--- book.sgml	Sat Feb 24 23:21:21 2001
+++ /tmp/book.sgml	Wed Feb 28 09:25:30 2001
@@ -5246,13 +5246,22 @@
             which &man.crontab.1; updates (the &man.crontab.5; manual
             page explains the differences in more detail).</para>
 
-          <para>If this is what you did, you should delete the
-            <filename>/var/cron/tabs/root</filename>, since it will
-            simply be a copy of <filename>/etc/crontab</filename>,
-            in the wrong format.  Next time, when you edit
-            <filename>/etc/crontab</filename>, you should not do
-            anything to inform &man.cron.8; of the changes, since it
-            will notice them automatically.</para>
+          <para>If this is what you did, the extra crontab is simply a
+            copy of <filename>/etc/crontab</filename> in the wrong
+            format it. Delete it with the command:</para>
+	    
+	    <screen>&prompt.root; <userintput>crontab <option>-r</option></userinput></screen>
+            
+	  <para>Next time, when you edit
+	    <filename>/etc/crontab</filename>, you should not do
+	    anything to inform &man.cron.8; of the changes, since it
+	    will notice them automatically.</para>
+
+	  <para>If you want something to be run once per day, week, or
+	    month, it's probably better to add shell scripts
+	    <filename>/usr/local/etc/periodic</filename>, and let the
+	    &man.periodic.8; command run from the system cron schedule
+	    it with the other periodic system tasks.</para>
 
           <para>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




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