One thing I still cannot remember after YEARS of usage is the scheduling syntax for cronjobs. To help with this I usually paste the following into each crontab:
# m h dom mon dow cmd
dom: day of month
dow: day of week
cmd: command to execute
Instead of fixed numbers, you can also use expressions. You probably already know the asterisk (
*) to match every value, but there are more:
- use commas to specify a list of values, eg.
- use hyphens to specify a range of values, eg.
- use slashes to specify steps, eg.
*/2in the minute field to execute a command every other minute. (note:
*/2in the minute field means execute command on every minute divisible by 2)