1 $Id: FEATURES,v 1.1 1994/01/05 20:40:11 jtc Exp $
3 Features of Vixie's cron relative to BSD 4.[23] and SysV crons:
5 -- Environment variables can be set in each crontab. SHELL, USER,
6 and HOME are set from the user's passwd entry; all except USER
7 can be changed in the crontab. PATH is especially useful to
8 set there. TZ can be set, but cron ignores it other than passing
9 it on through to the commands it runs. Format is
13 Blanks surrounding the '=' will be eaten; other blanks in value are
14 okay. Leading or trailing blanks can be preserved by quoting, single
15 or double quotes are okay, just so they match.
19 FOOBAR = this is a long blanky example
21 Above, FOOBAR would get `this is a long blanky example' as its value.
23 SHELL and HOME will be examined when it's time to run a command; if
24 you don't change them, they default to your /etc/passwd entry.
26 *DANGER*, WILL ROBINSON! This means that all 'uucp' logins should set
27 SHELL=/bin/sh or cron will try to use /usr/lib/uucp/uucico as the
28 shell. This won't work.
30 MAILTO, if set to the login name of a user on your system, will be the
31 person that cron mails the output of commands in that crontab. This is
32 useful if you decide on BINMAIL when configuring cron.h, since binmail
33 doesn't know anything about aliasing.
35 Setting SHELL=/bin/sh will in general speed up your commands since it
36 is a much smaller shell than the one you probably use normally (csh
37 or ksh) and has enough features to work non-interactively.
39 -- Weekdays can be specified by name. Case is not significant, but only
40 the first three letters should be specified.
42 -- Months can likewise be specified by name. Three letters only.
44 -- Ranges and lists can be mixed. Standard crons won't allow '1,3-5'.
46 -- Ranges can specify 'step' values. '10-16/2' is like '10,12,14,16'.
48 -- Sunday is both day 0 and day 7 -- apparently BSD and ATT disagree
51 -- Each user gets their own crontab file. This is a win over BSD 4.2,
52 where only root has one, and over BSD 4.3, where they made the crontab
53 format incompatible and although the commands can be run by non-root
54 uid's, root is still the only one who can edit the crontab file. This
55 feature mimics the SysV cron.
57 -- The 'crontab' command is loosely compatible with SysV, but has more
58 options which just generally make more sense. Running crontab with
59 no arguments will print a cute little summary of the command syntax.
61 -- Comments and blank lines are allowed in the crontab file. Comments
62 must be on a line by themselves; leading whitespace is ignored, and
63 a '#' introduces the comment.
65 -- (big win) If the `crontab' command changes anything in any crontab, it
66 tells the 'cron' daemon, who reloads all the tables before running the
67 next iteration. In some crons, you have to kill and restart the
68 daemon whenever you change a crontab. In other crons, the crontab
69 file is reread and reparsed every minute even if it didn't change.
71 -- In order to support the automatic reload, the crontab files are not
72 readable or writable except by 'crontab' or 'cron'. This is not a
73 problem, since 'crontab' will let you do pretty much whatever you
74 want to your own crontab, or if you are root, to anybody's crontab.
76 -- If any output is generated by a command (on stdout OR stderr), it will
77 be mailed to the owner of the crontab that contained the command (or
78 MAILTO, see discussion of environment variables, above). The headers
79 of the mail message will include the command that was run, and a
80 complete list of the environment that was passed to it, which will
81 contain (at least) the USER (LOGNAME on SysV), HOME, and SHELL.
83 -- the dom/dow situation is odd. '* * 1,15 * Sun' will run on the
84 first and fifteenth AND every Sunday; '* * * * Sun' will run *only*
85 on Sundays; '* * 1,15 * *' will run *only* the 1st and 15th. this
86 is why we keep 'e->dow_star' and 'e->dom_star'. I didn't think up
87 this behaviour; it's how cron has always worked but the documentation
88 hasn't been very clear.