@nopilot/cron-engine
v1.0.0
Published
Deterministic cron toolkit: parse/validate, next-N trigger computation (5 & 6-field), human-readable explanations (en/zh), cross-timezone next-fire. Pure local computation, zero network.
Maintainers
Readme
@nopilot/cron-engine
Deterministic cron toolkit: parse/validate (5 & 6-field, L/?/#nth), next-N
fire times in any IANA timezone (DST gap/overlap semantics documented), and
human-readable explanations in English and 简体中文. Pure local computation —
zero network, zero LLM, same input always yields the same output.
import { validateCron, nextRuns, describeCron } from '@nopilot/cron-engine';
validateCron('0 30 9 * * *'); // { valid: true, fieldCount: 6, ... }
nextRuns('*/15 9-17 * * 1-5', { count: 3, from: '2026-11-16T00:00:00Z' });
describeCron('0 9 * * 1-5', { locale: 'zh' }); // 「在上午 09:00, 星期一至星期五」Note: W/LW (nearest-weekday) modifiers are not supported by the underlying
cron-parser and are rejected with a deterministic error.
Built on cron-parser, cronstrue and luxon (all MIT).
MIT license. Part of the temporal-tools family — see the repo README for the MCP server that exposes this engine.
