1CRONTAB(5) File Formats CRONTAB(5)
2
3
4
6 crontab - files used to schedule the execution of programs
7
9 A crontab file contains instructions for the cron(8) daemon in the fol‐
10 lowing simplified manner: "run this command at this time on this date".
11 Each user can define their own crontab. Commands defined in any given
12 crontab are executed under the user who owns that particular crontab.
13 Uucp and News usually have their own crontabs, eliminating the need for
14 explicitly running su(1) as part of a cron command.
15
16 Blank lines, leading spaces, and tabs are ignored. Lines whose first
17 non-white space character is a pound-sign (#) are comments, and are not
18 processed. Note that comments are not allowed on the same line as cron
19 commands, since they are considered a part of the command. Similarly,
20 comments are not allowed on the same line as environment variable set‐
21 tings.
22
23 An active line in a crontab is either an environment setting or a cron
24 command. An environment setting is of the form:
25
26 name = value
27
28 where the white spaces around the equal-sign (=) are optional, and any
29 subsequent non-leading white spaces in value is a part of the value
30 assigned to name. The value string may be placed in quotes (single or
31 double, but matching) to preserve leading or trailing white spaces.
32
33 Several environment variables are set up automatically by the cron(8)
34 daemon. SHELL is set to /bin/sh, and LOGNAME and HOME are set from the
35 /etc/passwd line of the crontab´s owner. HOME and SHELL can be over‐
36 ridden by settings in the crontab; LOGNAME can not.
37
38 (Note: the LOGNAME variable is sometimes called USER on BSD systems and
39 is also automatically set).
40
41 In addition to LOGNAME, HOME, and SHELL, cron(8) looks at the MAILTO
42 variable if a mail needs to be send as a result of running any commands
43 in that particular crontab. If MAILTO is defined (and non-empty), mail
44 is sent to the specified address. If MAILTO is defined but empty
45 (MAILTO=""), no mail is sent. Otherwise, mail is sent to the owner of
46 the crontab. This option is useful if you decide to use /bin/mail
47 instead of /usr/lib/sendmail as your mailer. Note that /bin/mail does
48 not provide aliasing and UUCP usually does not read its mail. If MAIL‐
49 FROM is defined (and non-empty), it is used as the envelope sender
50 address, otherwise, ``root'' is used.
51
52 By default, cron sends a mail using the 'Content-Type:' header of
53 'text/plain' with the 'charset=' parameter set to the 'charmap/codeset'
54 of the locale in which crond(8) is started up, i.e., either the default
55 system locale, if no LC_* environment variables are set, or the locale
56 specified by the LC_* environment variables (see locale(7)). Different
57 character encodings can be used for mailing cron job