next up previous contents
Next: Examples Up: Scheduling programs to Previous: Examples

crontab

Crontab is used to run recurring jobs at scheduled times. It is slightly more complicated to use than at, but is a lot more powerful. Every user, who submits jobs with crontab, has a special file which contains all the user's jobs for cron. This file has a special format. It is divided into six columns:

  1. Specifies the minute (0-59).
  2. Specifies the hour (0-23).
  3. Specifies the day of the month (1-31).
  4. Specifies the month of the year (1-12).
  5. Specifies the day of the week (0-6 for Sunday to Saturday).
  6. Specifies the shell command to be executed.

The following values can be specified in the fields that indicate the time:

Note that it is possible to specify the days on which a command is run in two fields (day of month and day of week). It is possible to specify both fields or only one field. To use only one field to specify the days, the other field should contain an asterisk.

To edit your crontab entry run crontab -e. To list your entries run crontab -l. To remove all your crontab entries run crontab -r.





Mark O. Stitson
Wed Sep 25 10:45:32 BST 1996