Online Cron Expression Parser: Visualize Scheduled Task Scheduling
What Is a Cron Expression
A Cron expression is a string format for configuring scheduled task execution, widely used in Linux crontab, CI/CD pipelines, Node.js task schedulers, and distributed job systems. Paste an expression into the Cron Expression Parser to see each field’s expanded legal values, a human-readable summary, and the next 5 runs in the browser’s local timezone — answers to “what does this string mean?” and “when does it fire on my clock?”
Next-run math follows Vixie day/weekday OR semantics and is labeled as browser-local time. It is not the target server calendar: cloud VMs are often UTC, and containers without TZ usually are too — convert the preview, or smoke-test with a low-frequency log probe on the box. To build from requirements, use the Cron generator.
A standard Cron expression consists of 5 time fields:
┌───────────── Minute (0-59)
│ ┌───────────── Hour (0-23)
│ │ ┌───────────── Day of Month (1-31)
│ │ │ ┌───────────── Month (1-12 or JAN-DEC)
│ │ │ │ ┌───────────── Day of Week (0-7 or SUN-SAT; 0 and 7 both mean Sunday)
│ │ │ │ │
* * * * *
Why You Need a Cron Expression Parser
- Scheduled tasks: Server backups, data sync, report generation
- CI/CD scheduling: Timed builds and deployments
- Monitoring: Periodic health checks
- Data processing: ETL jobs, log rotation
- Understanding complex expressions: Expand fields and read the summary before you deploy
Cron Field Syntax
Special Characters
| Character | Meaning | Example |
|---|---|---|
* | Any value | * * * * * = every minute |
, | List | 1,3,5 * * * * = minutes 1, 3, 5 |
- | Range | 1-5 * * * * = minutes 1 through 5 |
/ | Step | */15 * * * * = every 15 minutes |
Common Cron Expressions
| Expression | Meaning |
|---|---|
* * * * * | Every minute |
0 * * * * | Every hour on the hour |
0 0 * * * | Daily at midnight |
0 9 * * 1-5 | Weekdays at 9:00 AM |
0 0 1 * * | First of every month at midnight |
0 0 * * 0 | Every Sunday at midnight |
*/5 * * * * | Every 5 minutes |
0 */2 * * * | Every 2 hours |
30 8 * * 1 | Monday at 8:30 AM |
0 0 1,15 * * | 1st and 15th of every month |
How to Use an Online Cron Parser
Using ToolVault's Cron Expression Parser:
- Enter a five-field Cron expression (e.g.,
*/15 * * * *, or0 9 * * MON-FRI) - The tool expands each field into its legal value list (name aliases resolve to digits first)
- Shows a human-readable summary assembled from those sets
- Lists the next 5 runs (browser local timezone; OR when both day fields are restricted)
- Wrong field count or truly out-of-range values (e.g. weekday
8) surface as clear errors; weekday7normalizes to Sunday0 - Start from built-in examples and tweak numbers or aliases while watching expansions and next runs
Cron in Code
Node.js
const cron = require('node-cron');
// Every 5 minutes
cron.schedule('*/5 * * * *', () => {
console.log('Running health check');
});
// Daily at 2:00 AM
cron.schedule('0 2 * * *', () => {
console.log('Running data backup');
});
Python
from crontab import CronTab
# Parse a Cron expression
cron = CronTab('* * * * *')
print(cron.description()) # "Every minute"
# Get next execution time
from datetime import datetime
next_run = cron.get_next(datetime)
Go
import "github.com/robfig/cron/v3"
c := cron.New()
// Every 5 minutes
c.AddFunc("*/5 * * * *", func() {
fmt.Println("Running health check")
})
c.Start()
Important Notes
Timezone
Cron expressions default to the server's local timezone. In distributed systems, use UTC consistently:
# UTC time
0 2 * * * # Daily at UTC 02:00
Sunday and name aliases
- This site’s parser:
0=Sunday …6=Saturday; accepts7and normalizes it to0(Vixie-compatible) - Months/weekdays accept three-letter English names:
JAN–DEC,SUN–SAT(case-insensitive) - Most docs:
1=Monday (confirm against your target implementation)
Minimum Granularity
Standard Cron's minimum granularity is minutes. For second-level scheduling, use extended Cron syntax (e.g., */5 * * * * * — 6 fields). Six-field strings return INVALID_CRON_FORMAT here — count fields for your scheduler dialect first.
The parsing model: five fields, then everything modern added
Classic cron: five fields with a subtle rule — when both day-of-month and day-of-week are restricted, they OR (not AND). The next-run table uses the same OR rule so misreads show up immediately. Modern extensions: seconds (Quartz / Spring), @daily/@hourly macros, k8s CronJob (five-field only — Quartz-with-seconds pastes fail confusingly). This site’s parser and generator bind the classic five-field dialect; count segments before cross-dialect paste.
Timezone: field expansion vs next runs are two layers
Field expansion does not use the browser timezone — it only turns */15 / MON-FRI into value sets. Next 5 runs use the browser-local clock and are labeled as such. What decides production “when it rings” is the daemon / container / CronJob clock: system cron uses server-local time; Docker often defaults to UTC; k8s can set timeZone; Quartz follows the JVM default. DST adds another trap: spring-forward hours never run, fall-back may run twice. Discipline: avoid the fuzzy 2–3am window; align the preview with the server timezone before go-live.
The five mistakes that make crons silently die
(1) Relative paths (cron’s cwd is not yours — cd explicitly); (2) missing environment (minimal PATH — source a profile or use absolute paths); (3) no output handling (mail nobody reads — redirect to a rotated log); (4) no lock (overlapping runs — flock); (5) no monitoring (dead for three weeks — heartbeat/deadman). Ops checklist: Linux crontab ops.
Implementer's note
describeCron collapses whitespace, requires exactly five fields, expands * / */n / a-b / a-b/n / a,b, and resolves month/weekday English names first; weekday 7 normalizes to 0. getNextCronRuns walks candidate times with month length and OR when both day fields are restricted. The description string remains an English phrase assembly — not a localized NL engine.
FAQ
What's the Relationship Between Cron Expressions and crontab?
A Cron expression is the string representation of a scheduling rule. crontab is the file/command in Linux for configuring scheduled tasks. You write Cron expressions into crontab to configure jobs.
Are */15 * * * * and 0,15,30,45 * * * * the Same?
They produce the same result — both execute every 15 minutes. */15 is shorthand step syntax.
How Do I Schedule Monday Through Friday?
Use 0 9 * * 1-5 or 0 9 * * MON-FRI (example: weekdays at 9am). In the day-of-week field, 1=Monday, 5=Friday, Sunday is 0 or 7 (equivalent here).
Which timezone do “next runs” use?
The preview uses the browser local timezone. If the target host is UTC, convert yourself, or smoke-test with a low-frequency date >> /tmp/cron-smoke.log job on the server.
Written and maintained by ToolVault. The homepage collects more browser-local tools.
Related Tools
Related Articles
Markdown to Word: Native Style Mapping and the Inline-Format Downgrade List
Turning a Markdown draft into a deliverable .docx: pandoc CLI vs in-browser local conversion, how headings/tables/code blocks map to native Word styles, which inline formats degrade to plain text, and why 'editable' beats 'looks right'.
Word to Markdown: Two Clean Paths and What Survives the Conversion
How to convert .docx to Markdown cleanly: pandoc CLI vs in-browser local conversion, a format fidelity table for headings/tables/images/auto-numbering, and fixes for the .doc legacy format, image bloat, and merged-cell tables.
China License Plate Rules and Validation: Standard, New Energy, and Special Formats Explained
Mainland China plate encoding rules in full: the standard blue plate, the GA36D-2018 new-energy format, armed police and embassy plates, province abbreviations and issuing-authority letters — with an online validator.