utc-cron-expr 11.2.0

Zero-dependency 5-field and 6-field POSIX/Quartz cron expression parser, O(1) bitmask matcher, and fast civil-calendar next-occurrence calculator.
Documentation
  • Coverage
  • 100%
    13 out of 13 items documented0 out of 0 items with examples
  • Size
  • Source code size: 42.6 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 379.5 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates-dev/ctares
    2 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • vshengbro

utc-cron-expr

Zero-Dependency 5/6-Field UTC Cron Expression Parser, Matcher & Scheduler

Crates.io Version Docs.rs CI Status Rust 2024 License: MIT

Workspace Overview · API Docs


Overview

utc-cron-expr parses standard 5-field, 6-field (with seconds), and @alias cron expressions into compact bitmasks with O(1) matching and fast Hinnant civil-calendar next_after UTC scheduling.

Installation

cargo add utc-cron-expr

Usage

use utc_cron_expr::{CronSchedule, UtcDateTime, days_from_civil};

let schedule = CronSchedule::parse("0 9 * * MON-FRI").unwrap();
let start = days_from_civil(2025, 1, 1) * 86_400;
let next = schedule.next_after(start).unwrap();
let formatted = format!("{}", UtcDateTime::from_unix_secs(next));
assert!(!formatted.is_empty());

Verification

cargo run -p crate-cli -- fmt --check
cargo clippy -p utc-cron-expr --all-features --all-targets -- -D warnings
cargo test -p utc-cron-expr --all-features

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For inquiries, please contact the author at root@devhub.vip.