What Is a Cron Job?
Cron is a time-based job scheduler in Unix-like operating systems. Cron jobs allow you to schedule scripts and commands to run automatically at specified times — from every minute to once a year.
Cron Expression Syntax
A cron expression has five fields: minute (0-59), hour (0-23), day of month (1-31), month (1-12), and day of week (0-7, where both 0 and 7 are Sunday). Use * for "every" and */n for "every n intervals".
Common Patterns
0 2 * * *— Every day at 2am*/5 * * * *— Every 5 minutes0 9 * * 1-5— Weekdays at 9am0 0 1 * *— First of every month at midnight
Debugging Failed Cron Jobs
Check cron logs: grep CRON /var/log/syslog. Ensure the script path is absolute. Test the script manually with the cron user account. Use MAILTO="" to suppress emails or set it to receive error notifications. Use our Cron Builder to verify your expressions before deploying.