pub struct SchedulerClient { /* private fields */ }Expand description
Client for managing workflow schedules.
Implementations§
Source§impl SchedulerClient
impl SchedulerClient
Sourcepub async fn save_schedule(&self, request: &SaveScheduleRequest) -> Result<()>
pub async fn save_schedule(&self, request: &SaveScheduleRequest) -> Result<()>
Save (create or update) a schedule.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn get_schedule(&self, name: &str) -> Result<WorkflowSchedule>
pub async fn get_schedule(&self, name: &str) -> Result<WorkflowSchedule>
Get a schedule by name.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_all_schedules(
&self,
workflow_name: Option<&str>,
) -> Result<Vec<WorkflowSchedule>>
pub async fn get_all_schedules( &self, workflow_name: Option<&str>, ) -> Result<Vec<WorkflowSchedule>>
Get all schedules, optionally filtered by workflow name.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_next_few_schedule_execution_times(
&self,
cron_expression: &str,
schedule_start_time: Option<i64>,
schedule_end_time: Option<i64>,
limit: Option<i32>,
) -> Result<Vec<i64>>
pub async fn get_next_few_schedule_execution_times( &self, cron_expression: &str, schedule_start_time: Option<i64>, schedule_end_time: Option<i64>, limit: Option<i32>, ) -> Result<Vec<i64>>
Get next few schedule execution times for a cron expression.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn delete_schedule(&self, name: &str) -> Result<()>
pub async fn delete_schedule(&self, name: &str) -> Result<()>
Delete a schedule.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn pause_schedule(&self, name: &str) -> Result<()>
pub async fn pause_schedule(&self, name: &str) -> Result<()>
Pause a schedule
Per-schedule pause/resume is PUT-mapped on OSS Conductor
(scheduler/core/.../rest/SchedulerResource.java maps only @PutMapping).
Orkes Conductor accepts both GET and PUT as of the dual
@RequestMapping(method = {GET, PUT}) added in 2026-07; deployments older
than that are GET-only. So PUT is tried first and a 405 falls back to
GET, which covers every server family without an extra probe.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn pause_all_schedules(&self) -> Result<()>
pub async fn pause_all_schedules(&self) -> Result<()>
Pause all schedules
GET-mapped on both server families (admin/debug endpoint), unlike the
per-schedule pause/resume calls above – no PUT is ever sent here.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn resume_schedule(&self, name: &str) -> Result<()>
pub async fn resume_schedule(&self, name: &str) -> Result<()>
Resume a schedule
See Self::pause_schedule for the PUT-with-GET-fallback rationale.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn resume_all_schedules(&self) -> Result<()>
pub async fn resume_all_schedules(&self) -> Result<()>
Resume all schedules
GET-mapped on both server families (admin/debug endpoint), unlike the
per-schedule pause/resume calls above – no PUT is ever sent here.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn search_schedule_executions(
&self,
start: Option<i32>,
size: Option<i32>,
sort: Option<&str>,
free_text: Option<&str>,
query: Option<&str>,
) -> Result<SearchResultWorkflowScheduleExecution>
pub async fn search_schedule_executions( &self, start: Option<i32>, size: Option<i32>, sort: Option<&str>, free_text: Option<&str>, query: Option<&str>, ) -> Result<SearchResultWorkflowScheduleExecution>
Search schedule executions.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn requeue_all_execution_records(&self) -> Result<()>
pub async fn requeue_all_execution_records(&self) -> Result<()>
Requeue all execution records
GET-mapped on both server families (admin/debug endpoint), unlike the
per-schedule pause/resume calls above – no PUT is ever sent here.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Set tags for a schedule.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Get tags for a schedule.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Delete tags from a schedule.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.