pub struct WorkflowSchedule {
pub cron: String,
pub timezone: String,
pub enabled: bool,
pub max_concurrent_runs: Option<u32>,
pub retry_on_failure: bool,
pub start_date: Option<DateTime<Utc>>,
pub end_date: Option<DateTime<Utc>>,
}Expand description
Workflow scheduling configuration
Fields§
§cron: StringCron expression (e.g., “0 0 * * *” for daily at midnight)
timezone: StringTimezone for schedule (e.g., “UTC”, “America/New_York”)
enabled: boolWhether the schedule is enabled
max_concurrent_runs: Option<u32>Maximum number of concurrent runs allowed (None = unlimited)
retry_on_failure: boolRetry failed scheduled runs
start_date: Option<DateTime<Utc>>Start date/time (schedule won’t run before this)
end_date: Option<DateTime<Utc>>End date/time (schedule won’t run after this)
Implementations§
Source§impl WorkflowSchedule
impl WorkflowSchedule
Sourcepub fn with_timezone(self, timezone: String) -> Self
pub fn with_timezone(self, timezone: String) -> Self
Set timezone
Sourcepub fn set_enabled(self, enabled: bool) -> Self
pub fn set_enabled(self, enabled: bool) -> Self
Enable or disable the schedule
Sourcepub fn with_max_concurrent_runs(self, max: u32) -> Self
pub fn with_max_concurrent_runs(self, max: u32) -> Self
Set maximum concurrent runs
Sourcepub fn is_valid_now(&self) -> bool
pub fn is_valid_now(&self) -> bool
Check if schedule is currently valid (within date range)
Trait Implementations§
Source§impl Clone for WorkflowSchedule
impl Clone for WorkflowSchedule
Source§fn clone(&self) -> WorkflowSchedule
fn clone(&self) -> WorkflowSchedule
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 moreSource§impl Debug for WorkflowSchedule
impl Debug for WorkflowSchedule
Source§impl<'de> Deserialize<'de> for WorkflowSchedule
impl<'de> Deserialize<'de> for WorkflowSchedule
Source§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
Auto Trait Implementations§
impl Freeze for WorkflowSchedule
impl RefUnwindSafe for WorkflowSchedule
impl Send for WorkflowSchedule
impl Sync for WorkflowSchedule
impl Unpin for WorkflowSchedule
impl UnwindSafe for WorkflowSchedule
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