@lowdep/cron-explain
v1.0.0
Published
Explain a cron expression in plain English and show the next N run times — supports macros, names, steps — zero dependencies
Maintainers
Readme
cron-explain
Translate a cron expression into plain English and compute its next run times — all locally. Zero dependencies.
cronstrue explains but is a library, not a CLI, and doesn't tell you when the job actually runs next. cron-explain does both in one command.
Install
npm install -g cron-explainOr without installing:
npx cron-explain "0 9 * * 1-5"Usage
cron-explain "*/15 * * * *" # Every 15 minutes
cron-explain "0 9 * * 1-5" # 9am on weekdays
cron-explain "0 0 1 * *" --next 3 # Monthly — show next 3 runs
cron-explain "@daily" # Macros
cron-explain "30 14 * * mon" --utc # Evaluate in UTC
cron-explain "0 9 * * 1-5" --no-next # Explanation onlyExample Output
cron-explain 0 9 * * 1-5
At 09:00, on weekdays (Mon–Fri).
Next 5 runs (local time)
▸ Mon 2026-06-01 09:00 in 2d
▸ Tue 2026-06-02 09:00 in 3d
▸ Wed 2026-06-03 09:00 in 4d
▸ Thu 2026-06-04 09:00 in 5d
▸ Fri 2026-06-05 09:00 in 6dSupported Syntax
| Feature | Example |
|---|---|
| Standard 5-field | 0 9 * * 1-5 |
| Steps | */15 * * * * |
| Ranges | 0 9-17 * * * |
| Lists | 0 0,12 * * * |
| Month names | 0 0 1 jan,jul * |
| Weekday names | 30 9 * * mon-fri |
| Macros | @daily @hourly @weekly @monthly @yearly @midnight |
Field order: minute hour day-of-month month day-of-week.
The Day-of-Month / Day-of-Week Quirk
Cron has a well-known gotcha: when both the day-of-month and day-of-week fields are restricted (neither is *), the job runs when either matches — not both. cron-explain honors this in both the English description ("on day-of-month 1 or on Monday") and the computed run times.
Options
| Flag | Description |
|---|---|
| -n, --next <N> | Number of upcoming runs to show (default: 5, max: 50) |
| --utc | Evaluate run times in UTC instead of local time |
| --no-next | Print only the English explanation |
| --json | Machine-readable output |
License
MIT
Keywords
cron expression · explain cron · crontab · cron next run · cronstrue alternative · cron parser · human readable cron · schedule · zero dependencies · cli
Built to solve, shared to help — Rushabh Shah 🛠️✨
One of 40+ zero-dependency developer CLI tools — no node_modules, ever.
