Prev topicNext topicHelp

Topic 29 of 29: crontab

Tue, Apr 8, 2003 (10:05) | Paul Terry Walhus (terry)
crontab is the unix way of scheduling jobs on a server.
1 response total.

 Topic 29 of 29 [unix]: crontab
 Response 1 of 1: Paul Terry Walhus (terry) * Tue, Apr  8, 2003 (10:05) * 25 lines 

The most important thing about the crontab manpage is the order in
which the timing controls occur. There are six columns at the start of
every command in the crontab. These are the time controls. It is normal
to see asterisks in most of the time controls; an asterisk means
"every" or "this column doesn't matter". But that doesn't make a lot of
sense until you grok the time controls:

1. Minute (0-59)
2. Hour (0-23)
3. Day of the month (1-31)
4. Month of the year (1-12)
5. Day of the week (0-6 with 0=Sunday)

So a command starting with "5 * * * *" means "run this commmand at 5
minutes after the hour every hour, every day, every month, every week."

A command starting with "30 5 * * *" means "run this command at 5:30
am every day every month every week".

A command starting with "*/5 * * * *" means "run this command every 5
minutes every hour, every day, every month, every week." (But some
versions of cron will not allow this syntax.)

Prev topicNext topicHelp

unix conference Main Menu