1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
use std::sync::Arc; use croner::Cron; use crate::scheduler::job::Job; pub mod job; pub mod tokio_scheduler; pub trait Scheduler: Default { fn start(&mut self); fn schedule_job(&mut self, cron: Cron, task: Arc<Job>); fn stop(&mut self); }