Skip to main content

solti_cron/
lib.rs

1//! Calendar scheduling for Taskvisor tasks.
2//!
3//! [`CronSchedule`] parses five-field cron expressions, or six fields with seconds,
4//! in an explicit IANA timezone. [`CronTask`] runs an existing [`taskvisor::TaskRef`]
5//! sequentially at future occurrences, inside one supervised attempt.
6//! Taskvisor retains ownership of admission, retries, cancellation, and shutdown.
7//! This crate does not spawn background workers or persist schedules.
8
9#![forbid(unsafe_code)]
10#![warn(missing_docs)]
11
12/// UTC calendar instants accepted and returned by the schedule API.
13pub use chrono::{DateTime, Utc};
14/// IANA timezone identifiers used by [`CronSchedule`].
15pub use chrono_tz::Tz;
16
17mod error;
18pub use error::CronError;
19mod schedule;
20pub use schedule::CronSchedule;
21mod task;
22pub use task::CronTask;
23
24/// Compiles runnable README examples as doctests.
25#[cfg(doctest)]
26#[doc = include_str!("../README.md")]
27struct ReadmeDoctests;