Cron Expression
Invalid cron expression. Must be 5 space-separated fields: minute hour day-of-month month day-of-week
Frequently asked questions
What is a cron expression?
A cron expression is a string of five fields that define a recurring schedule for automated tasks. The fields represent, in order: minute (0–59), hour (0–23), day of month (1–31), month (1–12), and day of week (0–6, where 0 = Sunday). For example, "0 9 * * 1-5" means "at 9:00 AM, Monday through Friday".
What does * mean in cron?
An asterisk (*) is a wildcard that means "every possible value" for that field. For instance, * in the minute field means every minute, and * in the month field means every month of the year.
What does */ mean in cron?
The */ syntax specifies step values. For example, */5 in the minute field means "every 5 minutes" (0, 5, 10, 15 … 55). You can also combine it with a range: 10-50/10 means every 10 units between 10 and 50.
How do I run a job every weekday?
Use "0 9 * * 1-5" to run a job at 9:00 AM Monday through Friday. The day-of-week field (last field) uses 1 for Monday and 5 for Friday. You can also use named abbreviations: MON-FRI.
What is the difference between day-of-month and day-of-week?
Day-of-month (field 3) specifies a calendar date like the 1st or 15th. Day-of-week (field 5) specifies a named day like Monday. When both are set to non-wildcard values, cron uses OR logic — the job runs if either condition is true. When only one is set (the other is *), only that condition is checked.