Syntax:
mm hh dd mt wd command
mm minute 0-59
hh hour 0-23
dd day of month 1-31
mt month 1-12
wd day of week 0-7 (Sunday = 0 or 7)
command: what you want to run
all numeric values can be replaced by * which means all
linux$ man -S 5 crontab
cron(8) examines cron entries once every minute.
The time and date fields are:
field allowed values
----- --------------
minute 0-59
hour 0-23
day of month 1-31
month 1-12 (or names, see below)
day of week 0-7 (0 or 7 is Sun, or use names)
...
# run five minutes after midnight, every day
5 0 * * * $HOME/bin/daily.job >> $HOME/tmp/out 2>&1
...
File: /etc/cron.d/myapp-cron
# use /bin/bash to run commands, no matter what /etc/passwd says
SHELL=/bin/bash
# Execute a nightly (11:00pm) cron job to scrub application records
00 23 * * * someuser /opt/myapp/bin/scrubrecords.php