CRONTAB(5)

NAME
crontab - format of a crontab file

DESCRIPTION
A crontab consists of comments, environment settings, and jobs.

environment settings
    An environment setting is a line of the form name=value, which is put into the environment of any job run out of this crontab. The enviroment setting MAILTO tells cron(8) to send mail to that user instead of to the user that owns the crontab.

comments
    A line where the first non-space character is a pound-sign (#) is a comment, and is ignored.

jobs
    A job is composed of six fields. The fields are separated by spaces or tabs. The first five are integer patters to specify the minute (0-59), hour (0-23), day of the month (1-31), month of the year (1-12), and day of the week (0-7 with 1=monday) when that job is to be run. Each of those patterns may contain a number in the range above; two numbers separated by a minute (meaning the range of numbers between the two); a list of numbers separated by commas; or an asterisk meaning all legal values.

    Skip values can be used in conjunction with an asterisk, a range, or a number. Following a value with “/number” specifies every numberth value across that range (or, in the case of a simple number, the range of that number up to the largest value for that field.) For example, “1-23/2” means every odd hour of the day (1,3,5,7,9,11,13,15,17,19,21,23).

    The sixth field is a string that is executed by the shell at the specified times. A non-escaped percent character (%) in this field is translated to a new-line character. Only the first line ( up to a % or end of line) is executed by the shell. The other lines are made available to the command as standard input.

EXAMPLES
# send mail to me at an offsite machine
MAILTO=orc@mailhost.org
# shut postoffice down at 3am, every day
0 3 * * *  killall -HUP postoffice
# wake postoffice up at 4:30am, every day
30 4 * * * /usr/lib/postoffice -bd -q45m
# tell myself to go home on friday
0 17 * * 5 echo "It's Friday.  Go home!"
# send mail to myself at teatime every weekday
0 16 * * 1-5 mail -s "teatime!" orc%drink some tea\
(if you're awake)

FILES

@CRONDIR@
    Where cron(8) looks for crontabs.

SEE ALSO
crontab(1), cron(8).

EXTENSIONS
Environment variables and job lines may be extended over multiple lines by escaping end of lines with \ .

The days of the week 0 and 7 both refer to Sunday.

AUTHOR
David Parsons (orc@pell.chi.il.us)