hyperlane-plugin-scheduler 23.3.0

A background async interval and 5-field cron job scheduler plugin for the Hyperlane framework with lock-free overlap protection, Tokio panic isolation, atomic per-job metrics, and graceful shutdown.
Documentation
use super::*;

/// Schedule kind controlling when a registered job executes.
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum JobSchedule {
    /// Runs repeatedly with a fixed delay between scheduled ticks.
    Interval(Duration),
    /// Runs on matching UTC minutes defined by a parsed 5-field [`CronMask`].
    Cron(CronMask),
}

/// Configuration or expression parsing error for [`Scheduler`].
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum SchedulerError {
    /// Cron expression failed validation.
    InvalidCron,
    /// Interval duration was zero.
    ZeroInterval,
}