What is a cron expression and what do the five fields mean?
A cron expression is a string of five (or six) space-separated fields that define a recurring schedule. In standard five-field format the order is: minute (0–59), hour (0–23), day of month (1–31), month (1–12), and day of week (0–6, where 0 is Sunday). For example, '30 9 * * 1-5' means 'at 9:30 AM every weekday'. See also our calculate API Rate Limit Min Interval Between Calls.
What do the special characters * , - / mean in a cron expression?
An asterisk (*) matches every possible value for that field. A comma (,) separates a list of specific values (e.g. '1,15' in the day field means the 1st and 15th). A hyphen (-) defines a range (e.g. '1-5' means 1 through 5). A forward slash (/) specifies a step — '*/15' in the minute field means every 15 minutes.
What does '0 0 * * *' mean?
'0 0 * * *' runs at minute 0 of hour 0 every day — in other words, every day at midnight (00:00). This is one of the most commonly used cron expressions for daily cleanup or reporting jobs.
How do I schedule a job to run every 5 minutes?
Use '*/5 * * * *'. The '*/5' in the minute field means 'every 5 minutes starting from 0', so the job fires at :00, :05, :10, :15 … :55 of every hour, every day. You might also find our Time Complexity Calculator useful.
How do I schedule a job to run only on weekdays?
Set the day-of-week field to '1-5' (Monday through Friday). For example, '0 9 * * 1-5' runs the job at 9:00 AM every Monday to Friday. The values 0 and 7 both represent Sunday in most cron implementations.
What is the difference between day-of-month and day-of-week, and can I use both?
Day-of-month specifies which calendar date (1–31) to run, while day-of-week specifies which day of the week (0–6). Most cron implementations treat them as an OR condition when both are set to non-wildcard values — meaning the job runs if either condition matches. To avoid ambiguity, set one to '*' when you are targeting the other.
Is the cron expression format the same across all systems?
Not exactly. The standard Unix/Linux crontab uses five fields (minute, hour, day, month, weekday). Quartz Scheduler (used in Java applications) adds a Seconds field at the front and an optional Year field at the end, giving six or seven fields. AWS EventBridge cron uses six fields with a slightly different syntax. Always check the documentation for your specific scheduler.
How do I test or verify my cron expression before deploying it?
Use this calculator — enter or build your expression and review the plain-English description and the list of upcoming execution times. Comparing several next-run dates against your expectations is the fastest way to confirm the schedule behaves as intended before you deploy to production.