1CRON(8) Cronie Users' Manual CRON(8)
2
3
4
6 cron - daemon to execute scheduled commands
7
9 cron [-n | -p | -s | -m<mailcommand>]
10 cron -x [ext,sch,proc,pars,load,misc,test,bit]
11
13 Cron should be started from /etc/rc.d/init.d or /etc/init.d
14
15 Cron searches /var/spool/cron for crontab files which are named after
16 accounts in /etc/passwd; The founded crontabs are loaded into memory.
17 Cron also searches for /etc/anacrontab and the files in the /etc/cron.d
18 directory, which are in a different format (see crontab(5) ). Cron
19 examines all stored crontabs, checking each command to see if it should
20 be run in the current minute. When executing commands, any output is
21 mailed to the owner of the crontab (or to the user named in the MAILTO
22 environment variable in the crontab, if such exists). Job output can
23 also be sent to syslog by using the -s option.
24
25 There are two ways, how the changes are checked in crontables. The
26 first is checking the modtime of file and the other is using inotify
27 support. You can find out which of them are you using, if you check
28 /var/log/cron where is (or isn't) inotify mentioned after start of dae‐
29 mon. The inotify support is watching for changes in all crontables and
30 touch the disk only in case that something was changed.
31
32 In other case cron checks each minute to see if its crontables modtime
33 have changes and reload those which have changes. There is no need to
34 restart cron after some of the crontable is modified. The modtime
35 option is used also when inotify couldn't be initialized.
36
37 Cron is checking those files or directories: /etc/anacrontab system
38 crontab is usually for running daily, weekly, monthly jobs.
39 /etc/cron.d/ where are system cronjobs stored for different users.
40 /var/spool/cron that's mean spool directory for user crontables.
41
42 Note that the crontab(1) command updates the modtime of the spool
43 directory whenever it changes a crontab.
44
45 Daylight Saving Time and other time changes
46 Local time changes of less than three hours, such as those caused by
47 the start or end of Daylight Saving Time, are handled specially. This
48 only applies to jobs that run at a specific time and jobs that are run
49 with a granularity greater than one hour. Jobs that run more fre‐
50 quently are scheduled normally.
51
52 If time has moved forward, those jobs that would have run in the inter‐
53 val that has been skipped will be run immediately. Conversely, if time
54 has moved backward, care is taken to avoid running jobs twice.
55
56 Time changes of more than 3 hours are considered to be corrections to
57 the clock or timezone, and the new time is used immediately.
58
59 It's possible to use different time zones for cron tables. More could
60 be found in crontab(5).
61
62 PAM Access Control
63 On Red Hat systems, crond now supports access control with PAM - see
64 pam(8). A PAM configuration file for crond is installed in
65 /etc/pam.d/crond. crond loads the PAM environment from the pam_env
66 module, but these can be overriden by settings in the appropriate
67 crontab file.
68
70 As a special case, the string off will disable sending mail.
71
72 -s This option will direct cron to send job output to the system
73 log using syslog(3). This is useful if your system has no send‐
74 mail(8), or if mail is disabled using -m off.
75
76 -m This option allows you to specify a shell command string to use
77 for sending cron mail output instead of sendmail(8). This com‐
78 mand must accept a fully formatted mail message (with headers)
79 on stdin and send it as a mail message to the recipients speci‐
80 fied in the mail headers.
81
82 -n This option changes default behavior causing it to run crond in
83 the foreground. This can be useful when starting it out of
84 init.
85
86 -p Cron permit any crontab, which user set.
87
88 -x With this option is possible to set debug flags.
89
90 -P Don't set PATH. PATH is instead inherited from the environment.
91
93 On receipt of a SIGHUP, the cron daemon will close and reopen its log
94 file. This is useful in scripts which rotate and age log files. Natu‐
95 rally this is not relevant if cron was built to use syslog(3).
96
98 The crontab files have to be regular files or symlinks to regular
99 files, they must not be executable or writable by anyone else than the
100 owner. This requirement can be overridden by using the -p option on
101 the crond command line. If inotify support is in use, changes in the
102 symlinked crontabs are not automatically noticed by the cron daemon.
103 The cron daemon must receive a SIGHUP to reload the crontabs. This is
104 a limitation of inotify API.
105
106
108 crontab(1), crontab(5), inotify(7), pam(8)
109
111 Paul Vixie <vixie@isc.org>
112 Marcela Mašláňová <mmaslano@redhat.com>
113
114
115
116Marcela Mašláňová December 2009 CRON(8)