Struct ScheduleSpec
pub struct ScheduleSpec {
pub cron: Option<String>,
pub every_ms: Option<u64>,
pub offset_ms: u64,
pub timezone: String,
pub overlap: Overlap,
pub jitter_ms: u64,
pub catchup_window_ms: u64,
pub paused: bool,
pub workflow: String,
pub input: Value,
}Expand description
When a schedule fires and what it starts.
Fields§
§cron: Option<String>Five fields (minute hour day-of-month month day-of-week) or an
alias (@hourly, @daily, @weekly, @monthly, @yearly).
every_ms: Option<u64>A fixed interval instead of cron.
offset_ms: u64Shifts interval times: they are offset + k * every since the epoch.
timezone: StringIANA time zone for cron (default UTC).
overlap: Overlap§jitter_ms: u64§catchup_window_ms: u64§paused: bool§workflow: StringThe workflow type each scheduled time starts, and its input.
input: ValueImplementations§
§impl ScheduleSpec
impl ScheduleSpec
pub fn validate_named(&self, name: &str) -> Result<()>
pub fn validate_named(&self, name: &str) -> Result<()>
validate, with the schedule’s name in the error.
pub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Checks the spec: a valid cron expression or interval and time zone.
pub fn next_after(&self, after_ms: u64) -> Option<u64>
pub fn next_after(&self, after_ms: u64) -> Option<u64>
The first scheduled time strictly after after_ms (Unix ms).
Trait Implementations§
§impl Clone for ScheduleSpec
impl Clone for ScheduleSpec
§fn clone(&self) -> ScheduleSpec
fn clone(&self) -> ScheduleSpec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for ScheduleSpec
impl Debug for ScheduleSpec
§impl Default for ScheduleSpec
impl Default for ScheduleSpec
§impl<'de> Deserialize<'de> for ScheduleSpecwhere
ScheduleSpec: Default,
impl<'de> Deserialize<'de> for ScheduleSpecwhere
ScheduleSpec: Default,
§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl PartialEq for ScheduleSpec
impl PartialEq for ScheduleSpec
§impl Serialize for ScheduleSpec
impl Serialize for ScheduleSpec
impl StructuralPartialEq for ScheduleSpec
Auto Trait Implementations§
impl Freeze for ScheduleSpec
impl RefUnwindSafe for ScheduleSpec
impl Send for ScheduleSpec
impl Sync for ScheduleSpec
impl Unpin for ScheduleSpec
impl UnsafeUnpin for ScheduleSpec
impl UnwindSafe for ScheduleSpec
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