Skip to content

What it is

cron is a Unix daemon that runs commands at scheduled times, driven by a crontab of five time fields (minute, hour, day, month, weekday) plus a command.

A cron job is a line in a crontab: 0 3 * * * /usr/local/bin/backup.sh means "run backup.sh at 03:00 every day". The five fields are, in order: minute (0–59), hour (0–23), day of month (1–31), month (1–12), day of week (0–6, Sunday = 0). Each field accepts ranges, lists and steps: */15 means "every 15 units", 1,15,30 means "on days 1, 15 and 30", 9-17 means "from 9 to 17".

cron is one of the oldest daemons still in production. It was written by Ken Thompson at Bell Labs in 1975, redesigned by Paul Vixie in 1987 (the version that still runs on most Linux systems), and reimplemented multiple times since (anacron, fcron, systemd timers).