pub struct Schedule {Show 15 fields
pub id: ScheduleId,
pub workflow_id: WorkflowId,
pub name: String,
pub description: Option<String>,
pub cron: String,
pub timezone: String,
pub enabled: bool,
pub input_variables: HashMap<String, Value>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub last_run: Option<DateTime<Utc>>,
pub next_run: Option<DateTime<Utc>>,
pub run_count: u64,
pub max_runs: Option<u64>,
pub expires_at: Option<DateTime<Utc>>,
}Expand description
Workflow schedule
Fields§
§id: ScheduleIdUnique schedule identifier
workflow_id: WorkflowIdWorkflow to execute
name: StringSchedule name
description: Option<String>Description
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
input_variables: HashMap<String, Value>Input variables for workflow execution
created_at: DateTime<Utc>When the schedule was created
updated_at: DateTime<Utc>When the schedule was last modified
last_run: Option<DateTime<Utc>>Last execution time
next_run: Option<DateTime<Utc>>Next scheduled execution time
run_count: u64Number of times this schedule has run
max_runs: Option<u64>Maximum number of times to run (None = infinite)
expires_at: Option<DateTime<Utc>>Expiration time (schedule becomes disabled after this)
Implementations§
Source§impl Schedule
impl Schedule
Sourcepub fn new(workflow_id: WorkflowId, name: String, cron: String) -> Self
pub fn new(workflow_id: WorkflowId, name: String, cron: String) -> Self
Create a new schedule
Sourcepub fn should_run(&self) -> bool
pub fn should_run(&self) -> bool
Check if schedule should run
Sourcepub fn mark_executed(&mut self)
pub fn mark_executed(&mut self)
Mark schedule as executed
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Schedule
impl<'de> Deserialize<'de> for Schedule
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 Schedule
impl RefUnwindSafe for Schedule
impl Send for Schedule
impl Sync for Schedule
impl Unpin 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