is used to execute commands periodically, with a
frequency specified in days. Unlike \fBcron(8)\fR,
it does not assume that the machine is running continuously. Hence,
-it can be used on machines that aren't running 24 hours a day,
+it can be used on machines that are not running 24 hours a day
to control regular jobs as daily, weekly, and monthly jobs.
.PP
-Anacron reads a list of jobs from a configuration file,
+Anacron reads a list of jobs from the
.I /etc/anacrontab
-(see \fBanacrontab(5)\fR). This file
+configuration file (see \fBanacrontab(5)\fR). This file
contains the list of jobs that Anacron controls. Each
job entry specifies a period in days,
a delay in minutes, a unique
job identifier, and a shell command.
.PP
For each job, Anacron checks whether
-this job has been executed in the last n days, where n is the period specified
-for that job. If not, Anacron runs the job's shell command, after waiting
+this job has been executed in the last \fBn\fR days, where \fBn\fR is the time period specified
+for that job. If a job has not been executed in \fBn\fR days or more, Anacron runs the job's shell command, after waiting
for the number of minutes specified as the delay parameter.
.PP
-After the command exits, Anacron records the date in a special
-timestamp file for that job, so it can know when to execute it again. Only
-the date is used for the time
-calculations. The hour is not used.
+After the command exits, Anacron records the date (excludes the hour) in a special
+timestamp file for that job, so it knows when to execute that job again.
.PP
When there are no more jobs to be run, Anacron exits.
.PP
Anacron only considers jobs whose identifier, as
-specified in the \fIanacrontab\fR matches any of
+specified in \fBanacrontab(5)\fR, matches any of
the
.I job
command-line arguments. The
.I job
-arguments can be shell wildcard patterns (be sure to protect them from
+command-line arguments can be represented by shell wildcard patterns (be sure to protect them from
your shell with adequate quoting). Specifying no
.I job
-arguments, is equivalent to specifying "*" (That is, all jobs will be
-considered).
+command-line arguments is equivalent to specifying "*" (that is, all jobs are
+considered by Anacron).
+.PP
+Unless Anacron is run with the \fB-d\fR option (specified below), it forks to the
+background when it starts, and any parent processes exit immediately.
.PP
-Unless the \fB-d\fR option is given (see below), Anacron forks to the
-background when it starts, and the parent process exits
-immediately.
-.PP
-Unless the \fB-s\fR or \fB-n\fR options are given, Anacron starts jobs
+Unless Anacron is run with the \fB-s\fR or \fB-n\fR options, it starts jobs
immediately when their delay is over. The execution of different jobs is
completely independent.
.PP
-If a job generates any output on its standard output or standard error,
-the output is mailed to the user running Anacron (usually root), or to
-the address contained by the MAILTO environment variable in the crontab, if such
-exists. If the LOGNAME environment variable is set, it will be used as From:
-field.
+If an executed job generates any output to standard output or to standard error,
+the output is mailed to the user under whom Anacron is running (usually root), or to
+the address specified in the \fBMAILTO\fR environment variable in the
+.I /etc/anacrontab
+file, if such exists. If the \fBLOGNAME\fR environment variable is set, it is used in the From: field of the mail.
.PP
-Informative messages about what Anacron is doing are sent to \fBsyslogd(8)\fR
-or \fBrsyslogd(8)\fR under facility \fBcron\fR, priority \fBnotice\fR. Error
-messages are sent at priority \fBerror\fR.
+Any informative messages generated by Anacron are sent to \fBsyslogd(8)\fR
+or \fBrsyslogd(8)\fR under with facility set to \fBcron\fR and priority set to \fBnotice\fR. Any error
+messages are sent with the priority \fBerror\fR.
.PP
"Active" jobs (i.e. jobs that Anacron already decided
-to run and now wait for their delay to pass, and jobs that are currently
+to run and are now waiting for their delay to pass, and jobs that are currently
being executed by
-Anacron), are "locked", so that other copies of Anacron won't run them
+Anacron), are "locked", so that other copies of Anacron cannot run them
at the same time.
.SH OPTIONS
.TP
.B -f
-Force execution of the jobs, ignoring the timestamps.
+Forces execution of all jobs, ignoring any timestamps.
.TP
.B -u
-Only update the timestamps of the jobs, to the current date, but
-don't run anything.
+Updates the timestamps of all jobs to the current date, but
+does not run any.
.TP
.B -s
-Serialize execution of jobs. Anacron will not start a new job before the
+Serializes execution of jobs. Anacron does not start a new job before the
previous one finished.
.TP
.B -n
-Run jobs now. Ignore the delay specifications in the
+Runs jobs immediately and ignores the specified delays in the
.I /etc/anacrontab
file. This options implies \fB-s\fR.
.TP
.B -d
-Don't fork to the background. In this mode, Anacron will output informational
-messages to standard error, as well as to syslog. The output of jobs
-is mailed as usual.
+Does not fork Anacron to the background. In this mode, Anacron will output informational
+messages to standard error, as well as to syslog. The output of any job
+is mailed by Anacron.
.TP
.B -q
-Suppress messages to standard error. Only applicable with \fB-d\fR.
+Suppresses any messages to standard error. Only applicable with \fB-d\fR.
.TP
.B -t some_anacrontab
-Use specified anacrontab, rather than the default
+Uses the specified anacrontab, rather than the
+.I /etc/anacrontab
+default one.
.TP
.B -T
-Anacrontab testing. The configuration file will be tested for validity. If
-there is an error in the file, an error will be shown and anacron will
-return 1. Valid anacrontabs will return 0.
+Anacrontab testing. Tests the
+.I /etc/anacrontab
+configuration file for validity. If
+there is an error in the file, it is shown on the standard output and Anacron
+returns the value of 1. Valid anacrontabs return the value of 0.
.TP
.B -S spooldir
-Use the specified spooldir to store timestamps in. This option is required for
+Uses the specified spooldir to store timestamps in. This option is required for
users who wish to run anacron themselves.
.TP
.B -V
-Print version information, and exit.
+Prints version information, and exits.
.TP
.B -h
-Print short usage message, and exit.
+Prints short usage message, and exits.
.SH SIGNALS
-After receiving a \fBSIGUSR1\fR signal, Anacron waits for running
-jobs, if any, to finish and then exits. This can be used to stop
+After receiving a \fBSIGUSR1\fR signal, Anacron waits for any running
+jobs to finish and then exits. This can be used to stop
Anacron cleanly.
.SH NOTES
-Make sure that the time-zone is set correctly before Anacron is
-started. (The time-zone affects the date). This is usually accomplished
+Make sure your time-zone is set correctly before Anacron is
+started since the time-zone affects the date. This is usually accomplished
by setting the TZ environment variable, or by installing a
.I /usr/lib/zoneinfo/localtime
file. See
.B tzset(3)
for more information.
-Timestamp files are created in the spool directory for each job in anacrontab. These are never removed automatically by anacron, and should be removed by hand if a job is no longer being scheduled.
+Timestamp files are created in the spool directory for each job specified in an anacrontab. These files are never removed automatically by Anacron, and should be removed by hand if a job is no longer being scheduled.
.SH FILES
.TP
.I /etc/anacrontab
.PP
Since 2004, it is maintained by Pascal Hakim <pasc@(debian.org|redellipse.net)>.
.PP
-For Fedora is anacron maintained by Marcela Mašláňová <mmaslano@redhat.com>.
+For Fedora, Anacron is maintained by Marcela Mašláňová <mmaslano@redhat.com>.
.TH ANACRONTAB 5 2009-08-17 "Marcela Mašláňová" "Anacron Users' Manual"
.SH NAME
-/etc/anacrontab \- configuration file for anacron
+/etc/anacrontab \- configuration file for Anacron
.SH DESCRIPTION
-The file
+The
.I /etc/anacrontab
-describes the jobs controlled by \fBanacron(8)\fR. Its lines can be of
-three kinds: job-description lines, environment
-assignments, or empty lines.
+configuration file describes the jobs controlled by \fBanacron(8)\fR. It can contain three types of lines:
+job-description lines, environment assignments, or empty lines.
.PP
-Job-description lines are of one of these two forms:
+Job-description lines can have the following format:
.PP
- period delay job-identifier command
+ period in days delay in minutes job-identifier command
.PP
+The
+.I period in days
+variable specifies the frequency of execution of a job in days. This variable can be represented by an integer or a macro (@daily, @weekly, @monthly), where @daily denotes the same value as the integer 1, @weekly the same as 7, and @monthly specifies that the job is run once a month, independent on the length of the month.
.PP
- @period_name delay job-identify command
+The
+.I delay in minutes
+variable specifies the number of minutes anacron waits, if necessary, before executing a job. This variable is represented by an integer where 0 means no delay.
.PP
-The
-.I period
-is specified in days, the
-.I delay
-in minutes. If the
-.I RANDOM_DELAY
-environment variable is set, then a random value between 0 and
-.I RANDOM_DELAY
-minutes will be added to the start up delay of the jobs.
-For example a
-.I RANDOM_DELAY
-set to 12 would therefore add, randomly, between 0 and 12 minutes to the user defined delay.
The
.I job-identifier
-can contain any non-blank character, except slashes. It is used to identify
-the job in Anacron messages,
-and as the name for the job's timestamp file. The
-.I command
-can be any shell command. The fields can be seperated by blank spaces or tabs.
+variable specifies a unique name of a job which is used in the log files.
+.PP
The
-.I period_name
-can be set to daily, weekly, monthly, yearly or annualy. This will ensure jobs
-are run once a week, month or year no matter the number of days in this period.
+.I command
+variable specifies the command to execute. The command can either be a command such as \fBls /proc >> /tmp/proc\fR or a command to execute a custom script.
.PP
-Environment assignment lines are of the form:
+Environment assignment lines can have the following format:
.PP
- VAR = VALUE
+ VAR=VALUE
.PP
-Spaces around
+Any spaces around
.I VAR
are removed. No spaces around
.I VALUE
-are allowed (unless you want them to be part of the value). The assignment
-takes effect from the next line to the end of the file, or to the next
-assignment of the same variable. The enviroment variable
+are allowed (unless you want them to be part of the value). The specified assignment
+takes effect from the next line until the end of the file, or to the next
+assignment of the same variable.
+.PP
+The
.I START_HOURS_RANGE
-sets the time frame, when the job could started.
+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.
+.PP
+The
+.I RANDOM_DELAY
+variable denotes the maximum number of minutes that will be added to the delay in minutes variable which is specified for each job. A
+.I RANDOM_DELAY
+set to 12 would therefore add, randomly, between 0 and 12 minutes to the delay in minutes for each job in that particular anacrontab. When set to 0, no random delay is added.
.PP
-Empty lines are either blank lines, line containing white-space only, or
-lines with white-space followed by a '#' followed by an arbitrary comment.
+Empty lines are either blank lines, line containing white spaces only, or
+lines with white spaces followed by a '#' followed by an arbitrary comment.
.PP
-You can continue a line onto the next line by ending it with a '\\'.
+You can continue a line onto the next line by adding a '\\' at the end of it.
.PP
-In case there is need for having anacron off, then it can be done by
-adding cron job
+In case you want to disable Anacron, add the
.I 0anacron
-into
+cron job (which is a part of
+.IR crontabs(4) )
+into the
.I /etc/cron.hourly/jobs.deny
-which is part of
-.IR crontabs(4).
+directory.
.SH EXAMPLE
-This example shows how to set up the behaviour similar to previous setting in
+This example shows how to set up an Anacron job similar in functionality to
.I /etc/crontab
-which will start all regular jobs
-.I only
-between 6:00 and 8:00. There is added RANDOM_DELAY which will be maximally
-30 minutes. Jobs will be running in queue. After one finish, then next will start.
-
+which starts all regular jobs
+between 6:00 and 8:00
+.I only.
+A
+.I RANDOM_DELAY
+which can be 30 minutes at the most is specified. Jobs will run serialized in a queue where each job is started only after the previous one is finished.
.nf
# environment variables
SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
RANDOM_DELAY=30
-# Anacron jobs will start between 6 and 8 o'clock.
+# Anacron jobs will start between 6am and 8am.
START_HOURS_RANGE=6-8
# delay will be 5 minutes + RANDOM_DELAY for cron.daily
-1 0 cron.daily nice run-parts /etc/cron.daily
+1 5 cron.daily nice run-parts /etc/cron.daily
7 0 cron.weekly nice run-parts /etc/cron.weekly
@monthly 0 cron.monthly nice run-parts /etc/cron.monthly
.fi
.PP
Currently maintained by Pascal Hakim <pasc@(debian.org|redellipse.net)>.
.PP
-For Fedora maintained by Marcela Mašláňová <mmaslano@redhat.com>.
+For Fedora, maintained by Marcela Mašláňová <mmaslano@redhat.com>.
.\"
.\" $Id: cron.8,v 1.8 2004/01/23 19:03:32 vixie Exp $
.\"
-.TH CRON "8" "22 September 2010"
+.TH CRON "8" "July 2010" "Marcela Mašláňová" "Cronie Users' Manual"
.SH NAME
-cron \- daemon to execute scheduled commands
+crond \- daemon to execute scheduled commands
.SH SYNOPSIS
-.B cron
-.RB [ -n " | " -p " | " -c " | " -s " | " -m \fP\fI<mail command>\fP\fB ]
-.br
-.B cron
+.B crond
+.RB [ -n " | " -p " | " -s " | " -m \fP\fI<mail command>\fP ]
+
+.B crond
.B -x
.RB [ext,sch,proc,pars,load,misc,test,bit]
.br
.SH DESCRIPTION
.I Cron
-should be started from
+is started from
.I /etc/rc.d/init.d
or
.I /etc/init.d
-. It will return immediately, so you don't need to start it with '&'.
+It returns immediately, thus, there is no need to need to start it with the '&' parameter.
.PP
.I Cron
searches
.I /var/spool/cron
for crontab files which are named after accounts in
.I /etc/passwd;
-The founded crontabs are loaded into memory.
+The found crontabs are loaded into the memory.
.I Cron
also searches for
.I /etc/anacrontab
-and the files in the
+and any files in the
.I /etc/cron.d
-directory, which are in a different format (see
-.BR crontab (5)
-).
+directory, which have a different format (see
+.BR crontab (5)).
.I Cron
-examines all stored crontabs, checking each command to see if it should be
+examines all stored crontabs and checks each job to see if it needs to be
run in the current minute. When executing
commands, any output is mailed to the owner of the crontab (or to the user
-named in the MAILTO environment variable in the crontab, if such exists).
-Job output can also be sent to syslog by using the
+specified in the
+.I MAILTO
+environment variable in the crontab, if such exists).
+Any job output can also be sent to syslog by using the
.B "\-s"
option.
.PP
-There are two ways, how the changes are checked in crontables. The first
-is checking the modtime of file and the other is using inotify support.
-You can find out which of them are you using, if you check
+There are two ways how changes in crontables are checked. The first
+method is checking the modtime of a file. The second method is using the inotify support.
+Using of inotify is logged in the
.I /var/log/cron
-where is (or isn't) inotify mentioned after start of daemon. The inotify support
-is watching for changes in all crontables and touch the disk only in case
-that something was changed.
+log after the daemon is started. The inotify support checks for changes in all crontables and accesses the
+hard disk only when a change is detected.
.PP
-In other case
-.I cron
-checks each minute to see if its crontables modtime have changes and reload
-those which have changes. There is no need to restart cron after some of the
-crontable is modified. The modtime option is used also when inotify couldn't be initialized.
+When using the modtime option,
+.I Cron
+checks its crontables' modtimes every minute to check for any changes and reloads
+the crontables which have changed. There is no need to restart
+.I Cron
+after some of the
+crontables were modified. The modtime option is also used when inotify can not be initialized.
.PP
.I Cron
-is checking those files or directories:
+checks these files and directories:
.IR /etc/anacrontab
-system crontab is usually for running daily, weekly, monthly jobs.
-.BR
+system crontab, usually used to run daily, weekly, monthly jobs. See
+.BR anacrontab (5)
+for more details.
.IR /etc/cron.d/
-where are system cronjobs stored for different users.
-.BR
+directory that contains system cronjobs stored for different users.
.IR /var/spool/cron
-that's mean spool directory for user crontables.
+directory that contains user crontables created by the
+.IR crontab
+command.
Note that the
.BR crontab (1)
command updates the modtime of the spool directory whenever it changes a
crontab.
-.PP
+.PP
.SS Daylight Saving Time and other time changes
Local time changes of less than three hours, such as those caused
-by the start or end of Daylight Saving Time, are handled specially.
+by the Daylight Saving Time changes, are handled in a special way.
This only applies to jobs that run at a specific time and jobs that
-are run with a granularity greater than one hour. Jobs that run
+run with a granularity greater than one hour. Jobs that run
more frequently are scheduled normally.
.PP
-If time has moved forward, those jobs that would have run in the
+If time was adjusted one hour forward, those jobs that would have run in the
interval that has been skipped will be run immediately.
-Conversely, if time has moved backward, care is taken to avoid running
-jobs twice.
+Conversely, if time was adjusted backward, running the same job twice is avoided.
.PP
Time changes of more than 3 hours are considered to be corrections to
-the clock or timezone, and the new time is used immediately.
+the clock or the timezone, and the new time is used immediately.
.PP
-It's possible to use different time zones for cron tables. More could
-be found in
-.IR crontab (5).
+It is possible to use different time zones for crontables. See
+.IR crontab (5)
+for more information.
.SS PAM Access Control
-On Red Hat systems, crond now supports access control with PAM - see
+.IR Cron
+supports access control with PAM if the system has PAM installed. For more information, see
.IR pam (8).
-A PAM configuration file for crond is installed in /etc/pam.d/crond.
-crond loads the PAM environment from the pam_env module, but these
-can be overriden by settings in the appropriate crontab file.
+A PAM configuration file for
+.IR crond
+is installed in
+.IR /etc/pam.d/crond .
+The daemon loads the PAM environment from the pam_env module. This
+can be overridden by defining specific settings in the appropriate crontab file.
.SH "OPTIONS"
.TP
-.B "\-i"
-By default are crontables checked by inotify. It could be switched
-back to old behaviour, when daemon is running with this option.
-.TP
-.B "\-s"
-This option will direct cron to send job output to the system log using
-.IR syslog (3).
-This is useful if your system has no
-.BR sendmail (8),
-or if mail is disabled using
-.BR "\-m off".
-.TP
.B "\-m"
-This option allows you to specify a shell command string to use for sending cron mail
-output instead of
-.BR sendmail (8).
-This command must accept a fully formatted mail message (with headers) on stdin and send it
-as a mail message to the recipients specified in the mail headers. As a special case, the string
-.I "off"
-will disable sending mail.
-
+This option allows you to specify a shell command to use for sending
+.I Cron
+mail output instead of using
+.BR sendmail (8)
+This command must accept a fully formatted mail message (with headers) on standard input and send it
+as a mail message to the recipients specified in the mail headers. Specifying
+the string
+.I "off"
+(i.e. crond -m off)
+will disable the sending of mail.
.TP
.B "\-n"
-This option changes default behavior causing it to run crond in the foreground. This can be
-useful when starting it out of init.
+Tells the daemon to run in the foreground. This can be useful when starting it out of init.
.TP
.B "\-p"
-Cron permit any crontab, which user set.
+Allows
+.I Cron
+to accept any user set crontables.
.TP
-.B "\-c"
-This option enables clustering support, as described below.
+.B "\-s"
+This option will direct
+.I Cron
+to send the job output to the system log using
+.IR syslog (3).
+This is useful if your system does not have
+.BR sendmail (8),
+installed or if mail is disabled.
.TP
.B "\-x"
-With this option is possible to set debug flags.
+This option allows you to set debug flags.
.SH SIGNALS
-On receipt of a \s-2SIGHUP\s+2, the cron daemon will close and reopen its
-log file. This is useful in scripts which rotate and age log files.
-Naturally this is not relevant if cron was built to use
+When the \s-2SIGHUP\s+2 is received, the
+.I Cron
+daemon will close and reopen its
+log file. This proves to be useful in scripts which rotate and age log files.
+Naturally, this is not relevant if
+.I Cron
+was built to use
.IR syslog (3).
.SH CLUSTERING SUPPORT
In this version of
-.BR cron
+.IR Cron
it is possible to use a network-mounted shared
.I /var/spool/cron
-across a cluster of hosts, and to specify that only one of the hosts should
-run the crontab jobs in this directory at any one time, by starting
-.I cron
-with the \fB-c\fP option, and having a file
+across a cluster of hosts and specify that only one of the hosts should
+run the crontab jobs in this directory at any one time. This is done by starting
+.I Cron
+with the \fB-c\fP option, and have the
.I /var/spool/cron/.cron.hostname
-containing just one line, which is the hostname of whichever host in the
-cluster should run these jobs. If this file does not exist, or the hostname
+file contain just one line, which represents the hostname of whichever host in the
+cluster should run the jobs. If this file does not exist, or the hostname
in it does not match that returned by
-.BR gethostname (2)
+.BR gethostname (2) ,
then all crontab files in this directory are ignored. This has no effect on
-cron jobs specified in the file
+cron jobs specified in the
.I /etc/crontab
-or in files in the
+file or on files in the
.I /etc/cron.d
-directory, which are always run, and considered host-specific.
+directory. These files are always run and considered host-specific.
.PP
Rather than editing
.I /var/spool/cron/.cron.hostname
-directly, you should use the \fB-n\fP option of
+directly, use the \fB-n\fP option of
.BR crontab (1)
to specify the host.
.PP
-You should ensure that all hosts in a cluster, and the fileserver from which
+You should ensure that all hosts in a cluster, and the file server from which
they mount the shared crontab directory, have closely synchronised clocks,
e.g. using
-.BR ntpd (8)
+.BR ntpd (8)
, otherwise the results will be very unpredictable.
.PP
-This option automatically disables inotify support, because inotify cannot be
-relied on with network-mounted shared filesystems.
+Using cluster sharing automatically disables inotify support, because inotify cannot be
+relied on with network-mounted shared file systems.
.SH CAVEATS
-The
+All
.BR crontab
files have to be regular files or symlinks to regular files, they must not be executable
-or writable by anyone else than the owner.
+or writable for anyone else but the owner.
This requirement can be overridden by using the \fB-p\fP option on the crond command line.
If inotify support is in use, changes in the symlinked crontabs are not automatically
-noticed by the cron daemon. The cron daemon must receive a SIGHUP to reload the crontabs.
-This is a limitation of inotify API.
-The syslog output will be used instead of mail, when sendmail isn't installed.
-
+noticed by the cron daemon. The cron daemon must receive a SIGHUP signal to reload the crontabs.
+This is a limitation of the inotify API.
+.PP
+The syslog output will be used instead of mail, when sendmail is not installed.
.SH "SEE ALSO"
.BR crontab (1),
.BR crontab (5),
.\"
.TH CRONTAB 1 "22 September 2010"
.SH NAME
-crontab \- maintain crontab files for individual users
+crontab \- maintains crontab files for individual users
.SH SYNOPSIS
.B crontab
.RB [ -u
.SH DESCRIPTION
.I Crontab
is the program used to install, remove or list the tables
-used to drive the
+used to serve the
.BR cron (8)
daemon. Each user can have their own crontab, and though these are files in
-.I /var/spool/
-, they are not intended to be edited directly. For SELinux in mls mode can be even
-more crontabs - for each range. For more see
+.IR /var/spool/ ,
+they are not intended to be edited directly. For SELinux in MLS mode, you can define
+more crontabs for each range. For more information, see
.BR selinux (8).
.PP
In this version of
-.BR cron
+.IR Cron
it is possible to use a network-mounted shared
.I /var/spool/cron
-across a cluster of hosts, and to specify that only one of the hosts should
-run the crontab jobs in this directory at any one time, and to use
+across a cluster of hosts and specify that only one of the hosts should
+run the crontab jobs in the particular directory at any one time. You may also use
.BR crontab (1)
from any of these hosts to edit the same shared set of crontab files, and to
set and query which host should run the crontab jobs.
.PP
-The cron jobs could be allow or disallow for different users. For classical
-crontab there exists
+Running cron jobs can be allowed or disallowed for different users. For this purpose, use the
.I cron.allow
and
.I cron.deny
files.
-If
+If the
.I cron.allow
-file exists, then you must be listed therein in order to be allowed to use
-this command. If the
+file exists, a user must be listed in it to be allowed to use cron
+If the
.I cron.allow
file does not exist but the
.I cron.deny
-file does exist, then you must \fInot\fR be listed in the
+file does exist, then a user must \fInot\fR be listed in the
.I cron.deny
-file in order to use this command. If neither of these files exists,
-only the super user will be allowed to use this command.
-The second option is using PAM authentication, where you set up users,
-which could or couldn't use
+file in order to use cron. If neither of these files exists,
+only the super user is allowed to use cron.
+Another way to restrict access to cron is to use PAM authentication to set up users,
+which are allowed or disallowed to use
.I crontab
-and \fBalso\fR system cron jobs from
-.IR /etc/cron.d/.
+or modify system cron jobs in the
+.IR /etc/cron.d/
+directory.
.PP
-The temporary directory could be set in enviroment variables. If it's not set
-by user than
+The temporary directory can be set in an environment variable. If it is not set
+by the user, the
.I /tmp
-is used.
+directory is used.
.PP
.SH "OPTIONS"
.TP
.B "\-u"
-Append the name of the user whose crontab is to be tweaked. If this option
-is not given,
+Appends the name of the user whose crontab is to be modified. If this option
+is not used,
.I crontab
examines "your" crontab, i.e., the crontab of the person executing the
command. Note that
.BR su (8)
-can confuse
-.I crontab
-and that if you are running inside of
+may confuse
+.IR crontab ,
+thus, when executing commands under
.BR su (8)
you should always use the
.B -u
-option for safety's sake.
-The first form of this command is used to install a new crontab from some
-named file or standard input if the pseudo-filename "-" is given.
+option. If no crontab exists for a particular user, it is created for him the first time the
+.B crontab -u
+command is used under his username.
.TP
.B "\-l"
-The current crontab will be displayed on standard output.
+Displays the current crontab on standard output.
.TP
.B "\-r"
-The current crontab will be removed.
+Removes the current crontab.
.TP
.B "\-e"
-This option is used to edit the current crontab using the editor specified by
+Edits the current crontab using the editor specified by
the \s-1VISUAL\s+1 or \s-1EDITOR\s+1 environment variables. After you exit
from the editor, the modified crontab will be installed automatically.
.TP
before actually removing the crontab.
.TP
.B "\-s"
-It will append the current SELinux security context string as an
+Appends the current SELinux security context string as an
MLS_LEVEL setting to the crontab file before editing / replacement
occurs - see the documentation of MLS_LEVEL in
.BR crontab(5)\.
.TP
.B "\-n"
-This option is only relevant if
+This option is relevant only if
.BR cron (8)
was started with the \fB-c\fP option, to enable clustering support. It is
-used to set which host in the cluster should run the jobs specified in the
-crontab files in the directory
-.I /var/spool/cron\.
-If a hostname is supplied, then the host whose hostname as returned by
+used to set the host in the cluster which should run the jobs specified in the
+crontab files in the
+.I /var/spool/cron\
+directory.
+If a hostname is supplied, the host whose hostname returned by
.BR gethostname(2)
-matches this will be selected to run these cron jobs subseqently. If there
-is no host in the cluster matching that hostname, or you explicitly specify
-an empty hostname, then these jobs will not be run at all. If the hostname
-is omitted, the name of the local host as returned by
+matches the supplied hostname, will be selected to run the selected cron jobs subsequently. If there
+is no host in the cluster matching the supplied hostname, or you explicitly specify
+an empty hostname, then the selected jobs will not be run at all. If the hostname
+is omitted, the name of the local host returned by
.BR gethostname(2)
-is assumed. Using this option has no effect on
+is used. Using this option has no effect on the
.I /etc/crontab
-and the files in the
+file and the files in the
.I /etc/cron.d
directory, which are always run, and considered host-specific. For more
-details about clustering support, see
+information on clustering support, see
.BR cron (8)\.
.TP
.B "\-c"
differs from previous versions of Vixie Cron, as well as from the classic
SVR3 syntax.
.SH DIAGNOSTICS
-A fairly informative usage message appears if you run it with a bad command
-line.
+An informative usage message appears if you run a crontab with a faulty command
+defined in it.
.SH AUTHOR
.nf
Paul Vixie <vixie@isc.org>
.\"
.\" $Id: crontab.5,v 1.6 2004/01/23 19:03:33 vixie Exp $
.\"
-.TH ANACRONTAB 5 "20 July 2009" "Marcela Mašláňová" "Cronie Users' Manual"
+.TH ANACRONTAB 5 "July 2010" "Marcela Mašláňová" "Cronie Users' Manual"
.SH NAME
-crontab \- tables for driving cron (ISC Cron V4.1)
+crontab \- files used to schedule the execution of programs
.SH DESCRIPTION
A
.I crontab
-file contains instructions to the
+file contains instructions for the
.BR cron (8)
-daemon of the general form: "run this command at this time on this date".
-Each user has their own crontab, and commands in any given crontab will be
-executed as the user who owns the crontab. Uucp and News will usually have
+daemon in the following simplified manner: "run this command at this time on this date".
+Each user can define their own crontab. Commands defined in any given crontab are
+executed under the user who owns that particular crontab. Uucp and News usually have
their own crontabs, eliminating the need for explicitly running
.BR su (1)
as part of a cron command.
.PP
-Blank lines and leading spaces and tabs are ignored. Lines whose first
-non-space character is a pound-sign (#) are comments, and are ignored.
+Blank lines, leading spaces, and tabs are ignored. Lines whose first
+non-white space character is a pound-sign (#) are comments, and are note processed.
Note that comments are not allowed on the same line as cron commands, since
-they will be taken to be part of the command. Similarly, comments are not
+they are considered a part of the command. Similarly, comments are not
allowed on the same line as environment variable settings.
.PP
-An active line in a crontab will be either an environment setting or a cron
-command. An environment setting is of the form,
+An active line in a crontab is either an environment setting or a cron
+command. An environment setting is of the form:
.PP
- name = value
+ name = value
.PP
-where the spaces around the equal-sign (=) are optional, and any subsequent
-non-leading spaces in
+where the white spaces around the equal-sign (=) are optional, and any subsequent
+non-leading white spaces in
.I value
-will be part of the value assigned to
+is a part of the value assigned to
.IR name .
The
.I value
string may be placed in quotes (single or double, but matching) to preserve
-leading or trailing blanks.
+leading or trailing white spaces.
.PP
Several environment variables are set up
automatically by the
.BR cron (8)
daemon.
-SHELL is set to /bin/sh, and LOGNAME and HOME are set from the /etc/passwd
-line of the crontab\'s owner.
-HOME and SHELL may be overridden by settings in the crontab; LOGNAME may not.
+.I SHELL
+is set to /bin/sh, and
+.I LOGNAME
+and
+.I HOME
+are set from the /etc/passwd line of the crontab\'s owner.
+.I HOME
+and
+.I SHELL
+can be overridden by settings in the crontab; LOGNAME can not.
.PP
-(Another note: the LOGNAME variable is sometimes called USER on BSD systems...
-on these systems, USER will be set also.)
+(Note: the
+.I LOGNAME
+variable is sometimes called
+.I USER
+on BSD systems and is also automatically set).
.PP
-In addition to LOGNAME, HOME, and SHELL,
+In addition to
+.IR LOGNAME ,
+.IR HOME ,
+and
+.IR SHELL ,
.BR cron (8)
-will look at MAILTO if it has any reason to send mail as a result of running
-commands in "this" crontab. If MAILTO is defined (and non-empty), mail is
-sent to the user so named. If MAILTO is defined but empty (MAILTO=""), no
-mail will be sent. Otherwise mail is sent to the owner of the crontab. This
-option is useful if you decide on /bin/mail instead of /usr/lib/sendmail as
-your mailer when you install cron -- /bin/mail doesn\'t do aliasing, and UUCP
-usually doesn\'t read its mail. If MAILFROM is defined (and non-empty), it
-will be used as the envelope sender address, otherwise, ``root'' will be used.
+looks at the
+.I MAILTO
+variable if a mail needs to be send as a result of running
+any commands in that particular crontab. If
+.I MAILTO
+is defined (and non-empty), mail is
+sent to the specified address. If
+.I MAILTO
+is defined but empty (\fIMAILTO=""\fR), no
+mail is sent. Otherwise, mail is sent to the owner of the crontab. This
+option is useful if you decide to use /bin/mail instead of /usr/lib/sendmail as
+your mailer. Note that /bin/mail does not provide aliasing and UUCP
+usually does not read its mail. If
+.I MAILFROM
+is defined (and non-empty), it
+is used as the envelope sender address, otherwise, ``root'' is used.
.PP
-By default, cron will send mail using the mail 'Content-Type:' header of 'text/plain'
-with the 'charset=' parameter set to the charmap / codeset of the locale in which
+By default, cron sends a mail using the 'Content-Type:' header of 'text/plain'
+with the 'charset=' parameter set to the 'charmap/codeset' of the locale in which
.BR crond (8)
-is started up - ie. either the default system locale, if no LC_* environment
+is started up - i.e. either the default system locale, if no LC_* environment
variables are set, or the locale specified by the LC_* environment variables
(see
.BR locale (7)).
-You can use different character encodings for mailed cron job output by
-setting the CONTENT_TYPE and CONTENT_TRANSFER_ENCODING variables in crontabs,
-to the correct values of the mail headers of those names.
+Different character encodings can be used for mailing cron job outputs by
+setting the
+.I CONTENT_TYPE
+and
+.I CONTENT_TRANSFER_ENCODING
+variables in a crontab to the correct values of the mail headers of those names.
.PP
-The CRON_TZ specifies the time zone specific for the cron table. User type into
-the chosen table times in the time of the specified time zone. The time into log
-is taken from local time zone, where is the daemon running.
+The
+.I CRON_TZ
+variable specifies the time zone specific for the cron table.
+The user should enter a time according to the specified time zone into the table.
+The time used for writing into a log file is taken from the local time zone, where the
+daemon is running.
.PP
-The MLS_LEVEL environment variable provides support for multiple per-job
+The
+.I MLS_LEVEL
+environment variable provides support for multiple per-job
SELinux security contexts in the same crontab.
By default, cron jobs execute with the default SELinux security context of the
user that created the crontab file.
When using multiple security levels and roles, this may not be sufficient, because
-the same user may be running in a different role or at a different security level.
-For more about roles and SELinux MLS/MCS see
+the same user may be running in different roles or in different security levels.
+For more information about roles and SELinux MLS/MCS, see
.BR selinux (8)
-and undermentioned crontab example.
-You can set MLS_LEVEL to the SELinux security context string specifying
-the SELinux security context in which you want the job to run, and crond will set
-the execution context of the or jobs to which the setting applies to the specified
-context.
-See also the
-.BR crontab(1)\ -s\ option.
+and the crontab example mentioned later on in this text.
+You can set the
+.I MLS_LEVEL
+variable to the SELinux security context string specifying
+the particular SELinux security context in which you want jobs to be run.
+.B crond
+will then set the execution context of those jobs that meet the specifications of the particular security context.
+For more information, see
+.BR crontab (1)\ -s\ option.
.PP
-The format of a cron command is very much the V7 standard, with a number of
-upward-compatible extensions. Each line has five time and date fields,
-followed by a user name if this is the system crontab file,
-followed by a command. Commands are executed by
+The format of a cron command is similar to the V7 standard, with a number of
+upward-compatible extensions. Each line has five time-and-date fields
+followed by a
+.BR user name
+(if this is the
+.BR system
+crontab file), and followed by a command. Commands are executed by
.BR cron (8)
-when the minute, hour, and month of year fields match the current time,
+when the 'minute', 'hour', and 'month of the year' fields match the current time,
.I and
-at least one of the two day fields (day of month, or day of week)
+at least one of the two 'day' fields ('day of month', or 'day of week')
match the current time (see "Note" below).
-Note that this means that non-existent times, such as "missing hours"
-during daylight savings conversion, will never match, causing jobs
+.PP
+Note that this means that non-existent times, such as the "missing hours"
+during the daylight savings time conversion, will never match, causing jobs
scheduled during the "missing times" not to be run. Similarly, times
-that occur more than once (again, during daylight savings conversion)
+that occur more than once (again, during the daylight savings time conversion)
will cause matching jobs to be run twice.
.PP
.BR cron (8)
-examines cron entries once every minute.
+examines cron entries every minute.
.PP
The time and date fields are:
.IP
.br
month 1-12 (or names, see below)
.br
-day of week 0-7 (0 or 7 is Sun, or use names)
+day of week 0-7 (0 or 7 is Sunday, or use names)
.br
.PP
-A field may be an asterisk (*), which always stands for "first\-last".
+A field may contain an asterisk (*), which always stands for "first\-last".
.PP
Ranges of numbers are allowed. Ranges are two numbers separated
with a hyphen. The specified range is inclusive. For example,
-8-11 for an "hours" entry specifies execution at hours 8, 9, 10
+8-11 for an 'hours' entry specifies execution at hours 8, 9, 10,
and 11.
.PP
Lists are allowed. A list is a set of numbers (or ranges)
separated by commas. Examples: "1,2,5,9", "0-4,8-12".
.PP
Step values can be used in conjunction with ranges. Following
-a range with "<number>" specifies skips of the number's value
-through the range. For example, "0-23/2" can be used in the hours
-field to specify command execution every other hour (the alternative
-in the V7 standard is "0,2,4,6,8,10,12,14,16,18,20,22"). Steps are
-also permitted after an asterisk, so if you want to say "every two
-hours", just use "*/2".
+a range with "/<number>" specifies skips of the number's value
+through the range. For example, "0-23/2" can be used in the 'hours'
+field to specify command execution for every other hour (the alternative
+in the V7 standard is "0,2,4,6,8,10,12,14,16,18,20,22"). Step values are
+also permitted after an asterisk, so if specifying a job to be run every two
+hours, you can use "*/2".
.PP
-Names can also be used for the "month" and "day of week"
+Names can also be used for the 'month' and 'day of week'
fields. Use the first three letters of the particular
-day or month (case doesn't matter). Ranges or
+day or month (case does not matter). Ranges or
lists of names are not allowed.
.PP
The "sixth" field (the rest of the line) specifies the command to be
run.
-The entire command portion of the line, up to a newline or %
+The entire command portion of the line, up to a newline or a "%"
character, will be executed by /bin/sh or by the shell
specified in the SHELL variable of the cronfile.
-Percent-signs (%) in the command, unless escaped with backslash
+A "%" character in the command, unless escaped with a backslash
(\\), will be changed into newline characters, and all data
after the first % will be sent to the command as standard
input.
.PP
-Note: The day of a command's execution can be specified by two
-fields \(em day of month, and day of week. If both fields are
-restricted (ie, aren't *), the command will be run when
+Note: The day of a command's execution can be specified in the following two
+fields \(em 'day of month', and 'day of week'. If both fields are
+restricted (i.e., do not contain the "*" character), the command will be run when
.I either
field matches the current time. For example,
.br
and
.I /etc/crontab
are system jobs, which are used usually for more than
-one user. That's the reason why is name of the user needed. MAILTO on the first line
+one user, thus, the username is needed. MAILTO on the first line
is optional.
-.SH EXAMPLE FOR JOB IN /etc/cron.d/job
+.SH EXAMPLE OF A JOB IN /etc/cron.d/job
.nf
#login as root
#create job with preferred editor (e.g. vim)
* * * * * root touch /tmp/file
.fi
.SH SELinux with multi level security (MLS)
-In crontab is important specified security level by \fIcrontab\ -s\fR or specifying
+In a crontab, it is important to specify a security level by \fIcrontab\ -s\fR or specifying
the required level on the first line of the crontab. Each level is specified
-in \fI/etc/selinux/targeted/seusers\fR. For using crontab in MLS mode is really important:
+in \fI/etc/selinux/targeted/seusers\fR. When using crontab in the MLS mode, it is especially important to:
.br
-- check/change actual role,
+- check/change the actual role,
.br
- set correct \fIrole for directory\fR, which is used for input/output.
.SH EXAMPLE FOR SELINUX MLS
# write in crontab file
MLS_LEVEL=SystemHigh
0-59 * * * * id -Z > /tmp/SystemHigh/crontest
-When I log in as a normal user, it can't work, because \fI/tmp/SystemHigh\fR is
-higher than my level.
.fi
.SH FILES
.I /etc/anacrontab
system crontab file for jobs like cron.daily, weekly, monthly.
.I /var/spool/cron/
-usual place for storing users crontab.
+a directory for storing crontabs defined by users.
.I /etc/cron.d/
-stored system crontables.
+a directory for storing system crontables.
.SH "SEE ALSO"
.BR cron (8),
.BR crontab (1)
.SH EXTENSIONS
-When specifying day of week, both day 0 and day 7 will be considered Sunday.
-BSD and ATT seem to disagree about this.
-.PP
-Lists and ranges are allowed to co-exist in the same field. "1-3,7-9" would
-be rejected by ATT or BSD cron -- they want to see "1-3" or "7,8,9" ONLY.
-.PP
-Ranges can include "steps", so "1-9/2" is the same as "1,3,5,7,9".
-.PP
-Names of months or days of the week can be specified by name.
-.PP
-Environment variables can be set in the crontab. In BSD or ATT, the
-environment handed to child processes is basically the one from /etc/rc.
-.PP
-If the uid of the owner is 0 (root), he can put a "-" as first character of
-a crontab entry. This will prevent cron from writing a syslog message about
-this command getting executed.
-.PP
-Command output is mailed to the crontab owner (BSD can't do this), can be
-mailed to a person other than the crontab owner (SysV can't do this), or the
-feature can be turned off and no mail will be sent at all (SysV can't do this
-either).
-.PP
-These special time specification "nicknames" are supported, which replace
-the 5 initial time and date fields, and are prefixed by the '@' character:
+These special time specification "nicknames" which replace
+the 5 initial time and date fields, and are prefixed with the '@' character, are supported:
.nf
@reboot : Run once after reboot.
@yearly : Run once a year, ie. "0 0 1 1 *".
@hourly : Run once an hour, ie. "0 * * * *".
.fi
.SH CAVEATS
-The
.BR crontab
files have to be regular files or symlinks to regular files, they must not be executable
-or writable by anyone else than the owner.
+or writable for anyone else but the owner.
This requirement can be overridden by using the \fB-p\fP option on the crond command line.
-If inotify support is in use changes in the symlinked crontabs are not automatically
-noticed by the cron daemon. The cron daemon must receive a SIGHUP to reload the crontabs.
-This is a limitation of inotify API.
+If inotify support is in use, changes in the symlinked crontabs are not automatically
+noticed by the cron daemon. The cron daemon must receive a SIGHUP signal to reload the crontabs.
+This is a limitation of the inotify API.
.SH AUTHOR
.nf