← Cron & Scheduling
Linux · Cron & Scheduling
How to read and write cron schedule syntax in Linux
Understand the five cron time fields (minute, hour, day of month, month, day of week) with practical schedule examples.
A cron line is five time fields plus a command. The fields are minute (0-59), hour (0-23), day of month (1-31), month (1-12), and day of week (0-7, where 0 and 7 are both Sunday).
# minute hour day-of-month month day-of-week command
# * * * * * command
# Every day at 02:30
30 2 * * * /path/to/backup.sh
# Every 15 minutes
*/15 * * * * /path/to/check.sh
# Weekdays at 18:00
0 18 * * 1-5 /path/to/report.sh
# Shorthand macros
@daily /path/to/daily.sh
@reboot /path/to/at-boot.shLinuxcronSyntax