cron: Use day/month names instead of nos.

This commit is contained in:
Agniva De Sarker 2016-09-08 15:07:36 +05:30
parent 3c00a0d180
commit 835c4a3e49

View File

@ -1,6 +1,7 @@
# crontab # crontab
> Schedule cron jobs to run on a time interval for the current user. > Schedule cron jobs to run on a time interval for the current user.
> Job definition format: "(min) (hour) (day_of_month) (month) (day_of_week) command_to_execute".
- Edit the crontab file for the current user: - Edit the crontab file for the current user:
@ -14,18 +15,14 @@
`crontab -r` `crontab -r`
- Cron job definition format:
`{{minute}} {{hour}} {{day_of_month}} {{month}} {{day_of_week}} {{command_to_execute}}`
- Sample job which runs at 10:00 every day. * means any value: - Sample job which runs at 10:00 every day. * means any value:
`0 10 * * * {{path/to/script.sh}}` `0 10 * * * {{path/to/script.sh}}`
- Sample job which runs every minute on the 3rd of April: - Sample job which runs every minute on the 3rd of April:
`* * 3 4 * {{path/to/script.sh}}` `* * 3 Apr * {{path/to/script.sh}}`
- Sample job which runs at 02:30 every friday: - Sample job which runs at 02:30 every Friday:
`30 2 * * 5 {{path/to/script.sh}}` `30 2 * * Fri {{path/to/script.sh}}`