Skip to main content

cron

Ref: Linux crontab command

cron / crontab

User crontab config file

/var/spool/cron/crontabs/<user>

crontab config file

/etc/crontab

Debian only

/etc/cron.d/
info
  • Use the standard system crontab /etc/crontab

crontab format

# minute hour day month week command
0 10-12 * * * echo "10:00 11:00 12:00"
30 10,20 * * * echo "10:30 20:30"
*/10 * * * * echo "Every 10 minutes"
Range
minute0 - 59
hour0 - 23
day1 - 31
month1 - 12
week0 - 6, 0 = Sunday
SymbolDescription
*Wildcard, specifies every possible time interval
,List multiple values separated by a comma
-Specify a range between two numbers, separated by a hyphen
/Specify a periodicity/frequency using a slash