A crontab file consists of lines of six fields each. The
fields are separated by spaces or tabs. The first five are
integer patterns that specify the following:
day of the month (1-31),
month of the year (1-12),
day of the week (0-6 with 0=Sunday).
Each of these patterns may be either an asterisk (meaning
all legal values) or a list of elements separated by commas.
An element is either a number or two numbers separated by a
minus sign (meaning an inclusive range). Note that the
specification of days may be made by two fields (day of the
month and day of the week). Both are adhered to if speci-
fied as a list of elements. See EXAMPLES.
The sixth field of a line in a crontab file is a string that
is executed by the shell at the specified times. A percent
character in this field (unless escaped by \) is translated
to a NEWLINE character.
To view your crontab file:
To edit your crontab file:
(By default this uses vi as an editor, to use a different editor (emacs):
"setenv EDITOR emacs" )
To remove your crontab file:
Here's how you would run the program log.pl located in /usr/home/eric at
3:15am every weekday morning:
15 3 * * 1-5 /usr/home/eric/log.pl
The first and fifteenth of each month:
0 0 1,15 * * /usr/home/eric/log.pl
0 0 * * 1 /usr/home/eric/log.pl
The first and fifteenth of each month and every monday:
0 0 1,15 * 1 /usr/home/eric/log.pl