Cron Expression Helper
Build and decode cron expressions with human-readable descriptions of each field.
About the Cron Expression Helper
The Cron Expression Helper on HT99 Tools parses a 5-field cron expression, validates each field against its allowed range, describes the schedule in plain English, and (optionally) computes the next five run times in UTC. Paste */5 9 * * 1-5 and the tool tells you it runs every five minutes during the 9 AM hour, Monday through Friday.
Cron is the time-based job scheduler that ships with every Unix-like operating system. The format — five fields separated by whitespace — was defined in Version 7 Unix (1979) and has been adopted verbatim by Kubernetes CronJobs, AWS EventBridge, GitHub Actions schedules, GitLab CI schedules, and most cloud-native orchestration systems. The five fields are: minute (0–59), hour (0–23), day of month (1–31), month (1–12), day of week (0–6, where 0 is Sunday).
Each field supports four syntaxes: * (every value in the range), */N (every Nth value), a-b (a range), and a,b,c (a list). Combinations like 1-5,10 are also valid. Some implementations (notably Quartz) add a sixth field for seconds; this tool follows the original 5-field format.
How It Works
The parser walks each field, splitting on commas to handle lists. For each comma-separated item it tries four patterns in order: * (every value), */N (every Nth value from the field minimum), a-b/N (a range with optional step), and a literal number. Each value is validated against the field's allowed range (e.g. minute 0–59; day of month 1–31). An out-of-range value, such as minute 60 or day-of-month 0, produces an error.
The parser builds a sorted set of allowed values for each field. The plain-English description is generated by inspecting the cardinality of each set: if minutes is the full 60-value range, the description says “every minute”; if it is a single value, it says “at minute N”; otherwise it lists the values. The same logic applies to hours, days of month, months, and days of week.
The next-runs calculator iterates minute by minute from the current time, checking whether the current minute/hour/day/month/day-of-week all fall in their respective sets. When all five match, the time is recorded. The iteration caps at one year to prevent infinite loops on impossible schedules (e.g. 0 0 30 2 *, which would never fire because month 2 has no day 30).
Worked Examples
The default expression */5 9 * * 1-5 parses as: minute = {0,5,10,15,20,25,30,35,40,45,50,55} (12 values), hour = {9} (one value), day of month = every day, month = every month, day of week = {1,2,3,4,5} (Monday through Friday). The plain-English description reads: “At minutes 0,5,10,15,20,25,30,35,40,45,50,55 of hour 9 every day in every month on Monday, Tuesday, Wednesday, Thursday, Friday.”
Switch to “List next 5 run times” and the tool computes the next five matches in UTC. If the current UTC time is Wednesday 2025-10-15 08:42:00, the next five runs would be 09:00, 09:05, 09:10, 09:15, 09:20 — all on the same day, since Wednesday is in the allowed day-of-week set.
Common patterns: 0 * * * * runs at the top of every hour; 0 0 * * * runs at midnight every day; 0 0 * * 0 runs at midnight every Sunday; 0 0 1 * * runs at midnight on the first of every month; */30 * * * * runs every 30 minutes; 0 9 * * 1-5 runs at 9 AM Monday through Friday (the classic morning standup cron).
When to Use This Tool
- Validating a cron expression before pasting it into a Kubernetes CronJob, GitHub Action, or GitLab CI schedule.
- Debugging why a scheduled job runs at the wrong time (often a UTC-vs-local-timezone issue).
- Documenting a cron schedule for team members who do not read cron syntax fluently.
- Detecting impossible schedules (e.g.
0 0 30 2 *) before deployment. - Generating the next few run times for a one-time scheduling confirmation.
- Translating between cron syntaxes (5-field to Quartz 6-field) by understanding the structure.
- Verifying that a schedule matches the intended cadence (e.g. every weekday vs. every day).
Limitations & Disclaimer
The tool implements the Vixie cron 5-field syntax. It does not support the optional seconds field (Quartz, Spring Scheduler), the optional year field, the optional user field (system crontab format), L (last day of month), W (nearest weekday), # (nth weekday of month), or named macros like @daily and @reboot. Day-of-month and day-of-week are treated with OR logic when both are restricted, per the standard. The next-runs calculator uses UTC; for local-timezone schedules, convert manually. See our disclaimer for full terms.
Frequently Asked Questions
What does */5 mean in a cron field?
It means “every 5th value in the field's range”. In the minute field (0–59), <code>*/5</code> expands to {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55} — twelve values, so the job runs twelve times per hour. In the hour field (0–23), <code>*/5</code> expands to {0, 5, 10, 15, 20}. Note that <code>*/5</code> does not mean “every 5 minutes from now”; it means “at minutes divisible by 5”.
What is the difference between 0 and 7 for Sunday?
Both are Sunday. The original V7 Unix cron used 0 for Sunday; some later implementations (BSD cron, Vixie cron) accept 7 as an alias. The tool accepts both 0 and 7 in the day-of-week field. Quartz (used by Java schedulers) uses 1 for Sunday and 7 for Saturday — that is a different convention and will not parse correctly here.
How does cron handle the day-of-month and day-of-week fields together?
With OR logic, not AND. If both fields are restricted (not <code>*</code>), the job runs when either matches. For example, <code>0 0 1 * 1</code> runs at midnight on the first of the month AND on every Monday — not only when the first of the month is a Monday. This is the most common cron gotcha and is documented in <code>man 5 crontab</code>.
What timezone does cron use?
On most systems, the system timezone (typically UTC on servers, local time on workstations). Kubernetes CronJobs run in UTC by default and can be set with <code>timeZone</code> in the spec (Kubernetes 1.25+). AWS EventBridge uses UTC. GitHub Actions uses UTC. Always check the scheduler's documentation; the same expression produces different wall-clock times in different timezones.
Can I run a job every second or every N seconds?
Not with standard 5-field cron, whose smallest unit is one minute. Quartz (6-field with a seconds field) and some extended implementations (such as Laravel's scheduler with <code>->everySecond()</code>) support sub-minute schedules. For sub-minute precision, use a job queue with a worker that polls on a shorter interval, or a system like systemd timers with <code>OnUnitActiveSec=15s</code>.
Is my expression uploaded anywhere?
No. Parsing and time computation run entirely in the browser. Cron expressions never leave the device.
Last updated: September 9, 2026 · Author: HT99 Tools Editorial Team