Multi-Engine Cron Expression Viewer & Simulator
Validate, decode, simulate future runs, and visually build Cron expressions in Unix POSIX, Quartz/Spring, and AWS EventBridge in real time.
Every 15 minutes past hour 9-17, Monday through Friday.
# Executa: Every 15 minutes past hour 9-17, Monday through Friday. */15 9-17 * * 1-5 /usr/local/bin/backup-job.sh >> /var/log/cron.log 2>&1
What is a Cron Expression and How Do Schedulers Work?
The cron utility is a time-based job scheduler in Unix-like operating systems. A cron expression is a string of space-separated fields defining recurring schedules for automated background tasks.
Over decades, modern runtimes expanded upon the original 5-field POSIX standard. Quartz Scheduler and Spring added an optional seconds field at the start and year at the end, alongside '?' for non-conflicting fields and 'L' for the last day. AWS EventBridge requires 6 fields including year and mandates the use of '?' in either day-of-month or day-of-week.
Anatomy and Field Positions in Cron Expressions
Understand field order and accepted value ranges across schedulers:
| Position | Field | Tamanho | Technical Purpose |
|---|---|---|---|
| 1 | Minute (Unix) / Second (Quartz) | - | Firing minute (0-59). In Quartz, this first column represents seconds. |
| 2 | Hour (Unix) / Minute (Quartz) | - | Hour of the day in 24-hour format (0 = midnight, 23 = 11 PM). In Quartz, represents minutes. |
| 3 | Day of Month | - | Calendar day of the month. 'L' specifies the last day of the current month. |
| 4 | Month | - | Numeric month of year or three-letter English abbreviation. |
| 5 | Day of Week | - | Day of the week. In Unix, 0 and 7 represent Sunday. In Quartz, 1 = Sunday to 7 = Saturday. |
| 6 | Year (Optional Quartz / Required AWS) | - | Four-digit calendar year. Required in AWS EventBridge and optional in Quartz. |
Special Characters & Operators Reference
How operators alter schedule periodicity:
- Asterisk (*): Represents all allowed values. In the minute field, it means 'every minute'.
- Slash (/ or Step): Specifies increments. '*/15' in the minute field triggers every 15 minutes.
- Hyphen (- or Range): Defines an inclusive range. '9-17' in the hour field triggers from 09:00 to 17:00.
- Comma (, or List): Separates discrete values. 'MON,WED,FRI' triggers only on the enumerated days.
- Question Mark (?): Used in Quartz and AWS when you specify a day of month and want to ignore day of week (or vice-versa).
- Last (L) & Weekday (W): 'L' indicates the last day of the month. 'W' targets the nearest weekday (Mon-Fri) to a specific calendar date.