[deployment-guide/comm-rel: 80/727] modified Cron chapter

Jaromir Hradilek jhradile at fedoraproject.org
Tue Oct 19 12:30:52 UTC 2010


commit df7ab447891283cd1c69b2c115a508ce8eae8177
Author: Martin Prpic <mprpic at redhat.com>
Date:   Tue Jul 20 15:07:41 2010 +0200

    modified Cron chapter

 en-US/Automated_Tasks.xml |   57 +++++++++++++++++++++++++++++++++------------
 1 files changed, 42 insertions(+), 15 deletions(-)
---
diff --git a/en-US/Automated_Tasks.xml b/en-US/Automated_Tasks.xml
index f026e09..f41363a 100644
--- a/en-US/Automated_Tasks.xml
+++ b/en-US/Automated_Tasks.xml
@@ -13,6 +13,14 @@
   </indexterm>
   <section id="s1-autotasks-cron-anacron">
     <title>Cron and Anacron</title>
+    <indexterm significance="normal">
+        <primary>anacron</primary>
+      </indexterm>
+      <indexterm significance="normal">
+        <primary>
+          <filename>cron</filename>
+        </primary>
+      </indexterm>
     <para>Both, Cron and Anacron, are daemons that can be used to schedule the execution of recurring tasks according to a combination of the time, day of the month, month, day of the week, and week.</para>
     <para>Cron assumes that the system is on continuously. If the system is not on when a job is scheduled, it is not executed. Cron allows jobs to be run as often as every minute. Anacron does not assume the system is always on, remembers every scheduled job, and executes it the next time the system is up. However, Anacron can only run a job once a day.    
     To schedule reccurring jobs, refer to <xref linkend="s2-configuring-anacron-jobs"/> or <xref linkend="s2-configuring-cron-jobs"/>. To schedule one-time jobs, refer to <xref linkend="s1-autotasks-at-batch"/>.</para>
@@ -24,16 +32,26 @@
     <section id="s2-configuring-anacron-jobs">
       <title>Configuring Anacron Jobs</title>
       <indexterm significance="normal">
-        <primary>cron</primary>
-        <secondary>configuration file</secondary>
+        <primary>anacron</primary>
+        <secondary>anacron configuration file</secondary>
       </indexterm>
       <indexterm significance="normal">
         <primary>
-          <filename>crontab</filename>
+          <filename>anacrontab</filename>
         </primary>
       </indexterm>
-
-      <para>The main configuration file to schedule jobs is <filename>/etc/anacrontab</filename>, which contains the following lines:</para>
+      <indexterm
+        significance="normal">
+        <primary>anacron</primary>
+        <secondary>user-defined tasks</secondary>
+      </indexterm>
+      <indexterm
+        significance="normal">
+        <primary>
+          <filename>/var/spool/anacron</filename>
+        </primary>
+      </indexterm>
+      <para>The main configuration file to schedule jobs is <filename>/etc/anacrontab</filename> (only root is allowed to modify this file), which contains the following lines:</para>
       <screen>
 SHELL=/bin/sh
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
@@ -49,10 +67,10 @@ START_HOURS_RANGE=3-22
 @monthly  45    cron.monthly  nice run-parts /etc/cron.monthly
 </screen>
       <para>
-  The first three lines are variables used to configure the environment in which the anacron tasks are run. The <computeroutput>SHELL</computeroutput> variable tells the system which shell environment to use (in this example the bash shell). The <computeroutput>PATH</computeroutput> variable defines the path used to execute commands. The output of the anacron jobs are emailed to the username defined with the <computeroutput>MAILTO</computeroutput> variable. If the <computeroutput>MAILTO</computeroutput> variable is defined as an empty string (<computeroutput>MAILTO=""</computeroutput>), email is not sent. 
+  The first three lines are variables used to configure the environment in which the anacron tasks are run. The <computeroutput>SHELL</computeroutput> variable tells the system which shell environment to use (in this example the bash shell). The <computeroutput>PATH</computeroutput> variable defines the path used to execute commands. The output of the anacron jobs are emailed to the username defined with the <computeroutput>MAILTO</computeroutput> variable. If the <computeroutput>MAILTO</computeroutput> variable is not defined, (i.e. is empty, <computeroutput>MAILTO=</computeroutput>), email is not sent. 
 </para>
       <para>
-  The next two lines are variables that modify the time for each scheduled job. The <computeroutput>RANDOM_DELAY</computeroutput> variable denotes the maximum number of minutes that are be added to the <filename>delay in minutes</filename> variable which is specified for each job. The minimum delay value is set, by default, to 6 minutes. A <computeroutput>RANDOM_DELAY</computeroutput> set to 12 would therefore add, randomly, between 6 and 12 minutes to the <filename>delay in minutes</filename> for each jot in that particular anacrontab. <computeroutput>RANDOM_DELAY</computeroutput> can also be set to a value below 6, or even 0. When set to 0, no random delay is added. This proves to be useful when, for example, more computers that share one network connection need to download the same data every day. The <computeroutput>START_HOURS_RANGE</computeroutput> variable defines an interval (in hours) when scheduled jobs can be run. In case this time interval is missed, for example,
  due to a power down, then scheduled jobs are not executed that day.
+  The next two lines are variables that modify the time for each scheduled job. The <computeroutput>RANDOM_DELAY</computeroutput> variable denotes the maximum number of minutes that will be added to the <filename>delay in minutes</filename> variable which is specified for each job. The minimum delay value is set, by default, to 6 minutes. A <computeroutput>RANDOM_DELAY</computeroutput> set to 12 would therefore add, randomly, between 6 and 12 minutes to the <filename>delay in minutes</filename> for each job in that particular anacrontab. <computeroutput>RANDOM_DELAY</computeroutput> can also be set to a value below 6, or even 0. When set to 0, no random delay is added. This proves to be useful when, for example, more computers that share one network connection need to download the same data every day. The <computeroutput>START_HOURS_RANGE</computeroutput> variable defines an interval (in hours) when scheduled jobs can be run. In case this time interval is missed, for example
 , due to a power down, then scheduled jobs are not executed that day.
 </para>
       <para>The rest of the lines in the <filename>/etc/anacrontab</filename> file represent scheduled jobs and have the following format:
 </para>
@@ -106,14 +124,14 @@ START_HOURS_RANGE=16-20
 <section id="s3-disabling-anacron">
 <title>Disabling Anacron</title>
 <para>
-  In case your system is continuously on and you do not require anacron to run your scheduled jobs, you can install the <filename>cronie-noanacron</filename> package which uninstalls the <filename>cronie-anacron</filename> package. Thus, you can define jobs using crontabs only.
+  In case your system is continuously on and you do not require anacron to run your scheduled jobs, you may uninstall the <filename>cronie-anacron</filename> package. Thus, you will be able to define jobs using crontabs only.
 </para>
 </section>
       </section>
     </section>
     <section id="s2-configuring-cron-jobs">
       <title>Configuring Cron Jobs</title>
-  <!-- <indexterm
+  <indexterm
         significance="normal">
         <primary>cron</primary>
         <secondary>user-defined tasks</secondary>
@@ -123,9 +141,18 @@ START_HOURS_RANGE=16-20
         <primary>
           <filename>/var/spool/cron</filename>
         </primary>
-      </indexterm> -->
+      </indexterm>
+      <indexterm significance="normal">
+        <primary>cron</primary>
+        <secondary>cron configuration file</secondary>
+      </indexterm>
+      <indexterm significance="normal">
+        <primary>
+          <filename>crontab</filename>
+        </primary>
+      </indexterm>
       <para>
-    The configuration file to configure cron jobs, <filename>/etc/crontab</filename>, contains the following lines:
+    The configuration file to configure cron jobs, <filename>/etc/crontab</filename> (only root is allowed to modify this file), contains the following lines:
   </para>
       <screen>
 SHELL=/bin/bash
@@ -195,7 +222,7 @@ minute   hour   day   month   day of week   user   command
             When using the <command>crontab</command> utility, there is no need to specify a user when defining a job. 
           </para>
       </note>
-      <para>The <filename>/etc/cron.d/</filename> directory contains files that have the same syntax as the <filename>/etc/crontab</filename> file. Only root is allowed to create and modify files in this directory</para>
+      <para>The <filename>/etc/cron.d/</filename> directory contains files that have the same syntax as the <filename>/etc/crontab</filename> file. Only root is allowed to create and modify files in this directory.</para>
       <note>
         <title>Note</title>
         <para>The cron daemon checks the <filename>/etc/anacrontab</filename> file, the <filename>/etc/crontab</filename> file, the <filename>/etc/cron.d/</filename> directory, and the <filename>/var/spool/cron/</filename> directory every minute for any changes. If any changes are found, they are loaded into memory. Thus, the daemon does not need to be restarted if an anacrontab or a crontab file is changed.</para>
@@ -203,7 +230,7 @@ minute   hour   day   month   day of week   user   command
     </section>
     <section id="s2-autotasks-cron-access">
       <title>Controlling Access to Cron</title>
-      <para>The <filename>/etc/cron.allow</filename> and <filename>/etc/cron.deny</filename> files are used to restrict access to cron. The format of both access control files is one username on each line. Whitespace is not permitted in either file. The cron daemon (<command>crond</command>) does not have to be restarted if the access control files are modified. The access control files are read each time a user tries to add or delete a cron task.</para>
+      <para>The <filename>/etc/cron.allow</filename> and <filename>/etc/cron.deny</filename> files are used to restrict access to cron. The format of both access control files is one username on each line. Whitespace is not permitted in either file. The cron daemon (<command>crond</command>) does not have to be restarted if the access control files are modified. The access control files are checked each time a user tries to add or delete a cron job.</para>
       <para>The root user can always use cron, regardless of the usernames listed in the access control files.</para>
       <para>If the file <filename>cron.allow</filename> exists, only users listed in it are allowed to use cron, and the <filename>cron.deny</filename> file is ignored.</para>
       <para>If <filename>cron.allow</filename> does not exist, users listed in <filename>cron.deny</filename> are not allowed to use cron.</para>
@@ -213,7 +240,7 @@ minute   hour   day   month   day of week   user   command
 -:ALL EXCEPT root :cron
 </screen>
       <para>
-        The forbidden jobs will be logged in an appropriate log file or, when using “crontab -e”, returned to the standard output. For more information, refer to <filename>access.conf.5</filename> (i.e. <command>man 5 access.conf</command>).
+        The forbidden jobs are logged in an appropriate log file or, when using “crontab -e”, returned to the standard output. For more information, refer to <filename>access.conf.5</filename> (i.e. <command>man 5 access.conf</command>).
       </para>
     </section>
     <section id="s2-black-white-listing-of-cron-jobs">
@@ -279,7 +306,7 @@ minute   hour   day   month   day of week   user   command
         </keycombo> . Alternatively, a shell script can be entered at the prompt, pressing <keycap>Enter</keycap> after each line in the script, and typing <keycombo><keycap>Ctrl</keycap>
           <keycap>D</keycap>
         </keycombo> on a blank line to exit. If a script is entered, the shell used is the shell set in the user's <envar>SHELL</envar> environment, the user's login shell, or <command>/bin/sh</command> (whichever is found first).</para>
-      <para>If the set of commands or script tries to display information to standard out, the output is emailed to the user.</para>
+      <para>If the set of commands or script tries to display information to standard output, the output is emailed to the user.</para>
       <para>Use the command <command>atq</command> to view pending jobs. Refer to <xref linkend="s2-autotasks-at-batch-viewing"/> for more information.</para>
       <para>Usage of the <command>at</command> command can be restricted. For more information, refer to <xref linkend="s2-autotasks-at-batch-controlling-access"/> for details.</para>
     </section>


More information about the docs-commits mailing list