A cron expression parser, matcher, scheduler, and CLI for MoonBit.
src/cron/ core parser, matcher, scheduler, tests
src/cli/ command-line interface
benchmarks/ public-API conformance corpus
docs/ architecture, API reference, acceptance notes, source notes
scripts/ validation and baseline helper scripts
.github/ GitHub Actions workflowimport {
"cxh04/cron_mbt@0.2.3",
}let expr = @cron.parse("*/5 8-10 ? * 1-5").unwrap()let matched = expr.matches(
year = 2026,
minute = 15,
hour = 9,
day_of_month = 10,
month = 6,
day_of_week = 3,
)let expr = @cron.parse("30 9 * * 1").unwrap()
let current = {
year: 2026,
month: 6,
day: 9,
hour: 10,
minute: 0,
}
let next = expr.next_time(current).unwrap()
// 2026-06-15 09:30moon run src/cli parse "0 9 ? * 1-5"moon run src/cli next "30 9 * * 1" 2026 6 9 10 0moon run src/cli match "15 10 * * *" 2026 6 10 10 15 3moon run src/cli explain "0 0 L * *"
moon run src/cli validate 2026 2 28 9 0
moon run src/cli next-many "0 9 * * 1-5" 2026 8 7 10 0 5moon check --target all --deny-warn
moon build --target all
moon fmt
moon info
moon test --target all --deny-warn
moon test benchmarks
powershell -ExecutionPolicy Bypass -File ./scripts/verify_acceptance.ps1 -SkipMooncakesA cron expression parser, matcher, scheduler, and CLI for MoonBit.