Cron Expression Generator
Build, validate, and understand cron expressions visually
Common Presets
Configure Each Field
Matches every minute value (0-59)
Matches every hour value (0-23)
Matches every day of month value (1-31)
Matches every month value (1-12)
Matches every day of week value (0-6)
Generated Expression
Description
Every minute
Next 5 Execution Times
Cron Syntax Reference
| Field | Allowed Values | Special Characters |
|---|---|---|
| Minute | 0 - 59 | * , - / |
| Hour | 0 - 23 | * , - / |
| Day of Month | 1 - 31 | * , - / |
| Month | 1 - 12 | * , - / |
| Day of Week | 0 - 6 (Sun = 0) | * , - / |
Special Characters
- * - Any value (wildcard)
- , - Value list separator (e.g., 1,3,5)
- - - Range of values (e.g., 1-5)
- / - Step values (e.g., */5 means every 5)
Quick Examples
- 0 9 * * 1-5 Weekdays at 9 AM
- */10 * * * * Every 10 minutes
- 0 0 1 * * 1st of every month
- 30 4 * * 0 Sunday at 4:30 AM
About the Cron Expression Generator
A cron expression is a string of five fields separated by spaces that represents a schedule. Cron is used in Unix-like systems to automate tasks such as running scripts, sending emails, taking backups, and performing maintenance. Each field specifies when a task should run: minute, hour, day of month, month, and day of week.
What Is Cron Used For?
System administrators and developers use cron jobs for automated scheduling. Common use cases include database backups at midnight, log rotation every week, sending daily reports by email, cache clearing, health checks, and periodic data synchronization between systems.
How to Read a Cron Expression
The five fields are, in order: minute (0-59), hour (0-23), day of month (1-31), month (1-12), and day of week (0-6, where 0 is Sunday). An asterisk (*) means "every possible value." A slash (/) specifies intervals, a hyphen (-) specifies ranges, and a comma (,) separates individual values.
Common Cron Expressions
- * * * * * - Runs every minute
- 0 * * * * - Runs every hour at minute 0
- 0 0 * * * - Runs daily at midnight
- 0 9 * * 1-5 - Runs weekdays at 9:00 AM
- 0 0 1 * * - Runs on the 1st of every month at midnight
- */15 * * * * - Runs every 15 minutes
- 0 8,20 * * * - Runs at 8 AM and 8 PM daily
Tips for Writing Cron Expressions
Always test your cron expressions before deploying them. Use the visual builder above to see the next execution times. Be careful with day-of-month and day-of-week combinations since they are OR-ed together in standard cron. Use comments in your crontab file to document what each job does. For complex schedules, consider using multiple cron entries instead of one overly complicated expression.