lacspace-cron
Explain, validate and preview cron expressions — in any timezone.
npx lacspace-cron "0 9 * * 1-5"Everything, in one command
lacspace-cron parses standard 5-field cron (and optional 6-field with seconds), explains it in a readable sentence, and computes the next runs using the built-in Intl API — so timezones, half-hour offsets and DST are handled correctly with no dependencies. It now understands the advanced day tokens L (last), W (nearest weekday) and # (nth weekday), Jenkins-style H (a seeded, deterministic spread, --seed), @every intervals and relative time, shows previous runs (--prev) or every run inside a window (--from/--to, --count-between), warns about DST skips/repeats, exports an .ics calendar (--ics), and compares two schedules for overlap. Great for double-checking a schedule before you ship it, or as a typed library inside your own scheduler.
What's inside
Plain English
"0 9 * * 1-5" → "At 09:00, Monday through Friday."
Real validation
Field-specific errors (out of range, bad token) instead of a silently wrong schedule.
Next N runs
Preview the upcoming run times from now or any --from date.
Timezone-aware
Compute runs in any IANA zone via Intl — DST and odd offsets included.
Names & macros
JAN–DEC, SUN–SAT, and @daily / @hourly / @weekly / @monthly / @yearly.
Typed library
parseCron, explainCron, nextRuns, isValidCron and matchesCron.
Advanced tokens (L/W/#/H)
Last day, nearest weekday, nth weekday, and Jenkins H spread — seeded and deterministic.
Runs in a window
Previous runs (--prev), every run between --from/--to, and --count-between totals.
.ics export
--ics writes an .ics calendar of the upcoming runs — drop it into any calendar app.
DST-safe
Warns when a run is skipped or repeated across a DST change; compare checks two schedules for overlap.
Copy, paste, done
Real commands and snippets — from a one-liner to the typed library.
lacspace-cron "0 9 * * 5L" --relativeExplains the 5L token and prints runs as "in 3 days" style.
lacspace-cron "H H(2-5) * * *" --seed nightly-etlDeterministic H placement seeded by a name — same seed, same times.
lacspace-cron "@every 90s" --next 4Fixed-interval schedules, not just cron fields.
lacspace-cron "0 9 * * 1-5" --next 10 --ics standup.icsWrites the next 10 runs as an .ics file.
lacspace-cron compare "0 * * * *" "*/15 * * * *"Reports when the two schedules fire at the same time.
What people build with it
✓ Sanity-check a crontab before deploy
✓ Show the next run time in a dashboard
✓ Validate user-entered schedules
✓ Drive your own job scheduler
Run lacspace-cron today
Free, open-source, no API keys. It's a CLI and a typed library.
npx lacspace-cron "0 9 * * 1-5"