pub enum Schedule {
Interval(Duration),
StaggeredInterval(StaggeredIntervalSchedule),
AtTimes(Vec<DateTime<Tz>>),
Cron(CronSchedule),
}Variants§
Interval(Duration)
Trigger repeatedly after the given interval.
StaggeredInterval(StaggeredIntervalSchedule)
Trigger repeatedly after the given interval with a stable phase.
The first run is aligned to a deterministic phase derived from the seed. If no seed is provided, the job id is used.
AtTimes(Vec<DateTime<Tz>>)
Trigger at the listed wall-clock times.
The list is sorted before execution starts. An empty list is treated as a no-op schedule and exits without running.
Cron(CronSchedule)
Trigger using a standard 5-field cron expression.
The scheduler timezone is used to calculate the next matching wall-clock time. The expression itself does not carry timezone information.
Implementations§
Source§impl Schedule
impl Schedule
Sourcepub fn staggered_interval(every: Duration) -> Self
pub fn staggered_interval(every: Duration) -> Self
Create a staggered interval schedule that defaults to the job id as the phase seed.
Sourcepub fn staggered_interval_with_seed(
every: Duration,
seed: impl Into<String>,
) -> Self
pub fn staggered_interval_with_seed( every: Duration, seed: impl Into<String>, ) -> Self
Create a staggered interval schedule with an explicit phase seed.
Trait Implementations§
impl Eq for Schedule
impl StructuralPartialEq for Schedule
Auto Trait Implementations§
impl Freeze for Schedule
impl RefUnwindSafe for Schedule
impl Send for Schedule
impl Sync for Schedule
impl Unpin for Schedule
impl UnsafeUnpin for Schedule
impl UnwindSafe for Schedule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more