From LedHed's Wiki
Contents
Overview
Each user can have their own crontab. This allows users to schedule jobs to run at specific intervals.
Example
0 */2 * * * /home/username/test.sh
* * * * * command to be executed ┬ ┬ ┬ ┬ ┬ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └───── day of week (0 - 7) (0 or 7 are Sunday, or use names) │ │ │ └─────── month (1 - 12) │ │ └───────── day of month (1 - 31) │ └─────────── hour (0 - 23) └───────────── min (0 - 59)
Predefined scheduling definitions
There are several special predefined values which can be used to substitute the CRON expression.
Entry | Description | Equivalent To |
---|---|---|
@yearly (or @annually) |
Run once a year at midnight in the morning of January 1 | 0 0 1 1 *
|
@monthly |
Run once a month at midnight in the morning of the first of the month | 0 0 1 * *
|
@weekly |
Run once a week at midnight in the morning of Sunday | 0 0 * * 0
|
@daily |
Run once a day at midnight | 0 0 * * *
|
@hourly |
Run once an hour at the beginning of the hour | 0 * * * *
|
@reboot |
Run at startup | @reboot
|
View Job List
crontab -l
Add/Edit Job
crontab -e
Reference
http://en.wikipedia.org/wiki/Cron
http://www.freebsd.org/cgi/man.cgi?query=crontab&sektion=1&apropos=0&manpath=FreeBSD+9.0-RELEASE