pub struct CronService { /* private fields */ }Implementations§
Source§impl CronService
impl CronService
pub fn new(store_path: PathBuf, on_job: Option<JobCallback>) -> Self
pub async fn start(&self)
pub async fn stop(&self)
pub async fn list_jobs(&self, include_disabled: bool) -> Vec<CronJob>
pub async fn list_job_views(&self, include_disabled: bool) -> Vec<CronJobDto>
pub async fn get_job(&self, job_id: &str) -> Option<CronJobDto>
pub async fn add_job( &self, name: String, schedule: CronSchedule, message: String, deliver: bool, channel: Option<String>, to: Option<String>, delete_after_run: bool, ) -> CronJob
pub async fn create_job( &self, request: CreateCronJobRequest, ) -> Result<CronJobDto, String>
pub async fn update_job( &self, job_id: &str, request: UpdateCronJobRequest, ) -> Result<CronJobDto, String>
pub async fn delete_job(&self, job_id: &str) -> Result<(), String>
pub async fn remove_job(&self, job_id: &str) -> bool
pub async fn enable_job(&self, job_id: &str, enabled: bool) -> Option<CronJob>
pub async fn set_job_enabled( &self, job_id: &str, enabled: bool, ) -> Result<CronJobDto, String>
pub async fn run_job(&self, job_id: &str, force: bool) -> bool
pub async fn run_job_now( &self, job_id: &str, force: bool, ) -> Result<CronJobDto, String>
pub async fn stop_run(&self, job_id: &str) -> Result<CronRunSnapshot, String>
pub async fn status(&self) -> Value
Auto Trait Implementations§
impl Freeze for CronService
impl !RefUnwindSafe for CronService
impl Send for CronService
impl Sync for CronService
impl Unpin for CronService
impl UnsafeUnpin for CronService
impl !UnwindSafe for CronService
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