Scheduling in Linux: cron and crontab
Updated July 3, 2026
cron runs commands on a schedule, and each user edits their own schedule with crontab -e.
Syntax
crontab -e # minute hour day month weekday commandCommon cases
crontab -e # open your schedule in an editor
crontab -l # show your jobs
# example schedule lines:
0 3 * * * /path/backup.sh # every day at 03:00
*/15 * * * * /path/check.sh # every 15 minutes
0 9 * * 1 /path/report.sh # Mondays at 09:00How it works: the five time fields
A schedule line starts with five fields: minute, hour, day of month, month, day of week. A star
*means 'any value',*/15means 'every 15'; comma lists and dash ranges work too. cron is a service: it checks the schedules once a minute and runs whatever is due. cron has a very bare environment (a shortPATH), so in jobs you write full paths to commands and files. systemd has its own replacement - timers (systemctl list-timers).
In the book
This topic is covered in full in the chapter Scheduling tasks.