What Is a Cron Expression Generator?
A cron expression generator helps you build cron schedule strings used by Unix-like operating systems and task schedulers. Cron expressions define when automated tasks run, using a compact five or six-field format representing minutes, hours, days, months, and weekdays.
How to Use This Cron Expression Generator
- Enter values in the five cron fields: Minute (0-59), Hour (0-23), Day of Month (1-31), Month (1-12), and Day of Week (0-6). Use * for “any,” ranges like 1-5, or steps like */5.
- The cron expression and a human-readable description update automatically as you type.
- Click “Generate” to load a random preset schedule for quick experimentation.
- Copy the expression for use in crontab, CI/CD pipelines, or job schedulers.
Key Concepts
A standard 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 represent Sunday). Special characters include * (any value), , (list separator), - (range), and / (step). For example, “0 */2 * * *” means “every 2 hours at minute 0.”
Frequently Asked Questions
What does the asterisk (*) mean in cron?
The asterisk is a wildcard meaning “every possible value” for that field. For instance, * in the hour field means every hour.
How do I schedule a task for every 5 minutes?
Use the expression “*/5 * * * *”. The /5 step value in the minutes field triggers execution at 0, 5, 10, 15, and so on.
What is the difference between 5-field and 6-field cron?
Standard Unix cron uses 5 fields. Some systems like Quartz Scheduler add a sixth field for seconds at the beginning of the expression.