What is Cron Expression?
A string of five fields that defines when a scheduled job should run.
Definition
A cron expression is a compact notation consisting of five space-separated fields — minute, hour, day of month, month, and day of week — that precisely defines a recurring schedule. Each field accepts specific values, ranges, wildcards (*), and step values (/). For example, "*/15 9-17 * * 1-5" means "every 15 minutes during business hours on weekdays." Some implementations add a sixth field for seconds or year.
Simple Analogy
A cron expression is like writing a date pattern in shorthand: instead of saying "every weekday at 9 AM, 10 AM, 11 AM..." you write "0 9-11 * * 1-5" — five fields that encode the entire schedule in one line.
Why It Matters
Cron expressions are the language you use to tell CronJobPro when to run your jobs. A single character mistake can change "run daily at midnight" into "run every minute." Understanding the syntax prevents scheduling errors that could trigger thousands of unwanted executions or miss critical tasks entirely.
How to Verify
Use CronJobPro's built-in Cron Expression Generator at /tools/cron-generator to build expressions visually. The Cron Explainer at /tools/cron-explainer translates any expression into plain English. Always verify the "next 5 runs" preview before saving a job.
Common Mistakes
Writing "* * * * *" (every minute) when you meant "0 * * * *" (every hour). Confusing day-of-week numbering (0 = Sunday in standard cron, 1 = Monday in some implementations). Using 24 in the hour field instead of 0 for midnight. Forgetting that both day-of-month AND day-of-week are OR-ed, not AND-ed.
Best Practices
Always test your expression with a cron explainer tool before deploying. Use step values (*/5) for intervals instead of listing values (0,5,10,15...). Add comments next to complex expressions explaining what they do in plain English. Start with a well-tested expression from the /cron examples library.
Cron Expression Generator
Build your cron expression
Try it free →Frequently Asked Questions
What is Cron Expression?
A cron expression is a compact notation consisting of five space-separated fields — minute, hour, day of month, month, and day of week — that precisely defines a recurring schedule. Each field accepts specific values, ranges, wildcards (*), and step values (/). For example, "*/15 9-17 * * 1-5" means "every 15 minutes during business hours on weekdays." Some implementations add a sixth field for seconds or year.
Why does Cron Expression matter for cron jobs?
Cron expressions are the language you use to tell CronJobPro when to run your jobs. A single character mistake can change "run daily at midnight" into "run every minute." Understanding the syntax prevents scheduling errors that could trigger thousands of unwanted executions or miss critical tasks entirely.
What are best practices for Cron Expression?
Always test your expression with a cron explainer tool before deploying. Use step values (*/5) for intervals instead of listing values (0,5,10,15...). Add comments next to complex expressions explaining what they do in plain English. Start with a well-tested expression from the /cron examples library.
Related Terms
Minute Field
The first field in a cron expression, specifying which minutes (0-59) the job runs.
Hour Field
The second field in a cron expression, specifying which hours (0-23) the job runs.
Day of Month Field
The third field in a cron expression, specifying which calendar days (1-31) the job runs.
Month Field
The fourth field in a cron expression, specifying which months (1-12 or JAN-DEC) the job runs.
Day of Week Field
The fifth field in a cron expression, specifying which weekdays (0-7 or SUN-SAT) the job runs.
Asterisk Wildcard (*)
A special character meaning "every possible value" in a cron expression field.