pub struct Scheduler { /* private fields */ }Expand description
A running cron scheduler that manages one or more periodic jobs.
Implements crate::runtime::Task for clean shutdown integration with the
runtime’s run! macro.
When Task::shutdown is called (or the
run! macro triggers it), the scheduler signals all job loops to stop and
waits up to 30 seconds for in-flight executions to complete.
Implementations§
Source§impl Scheduler
impl Scheduler
Sourcepub fn builder(registry: &Registry) -> SchedulerBuilder
pub fn builder(registry: &Registry) -> SchedulerBuilder
Create a new SchedulerBuilder from a service registry.
The registry is snapshotted at build time; services added to registry
after this call will not be visible to cron handlers.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scheduler
impl RefUnwindSafe for Scheduler
impl Send for Scheduler
impl Sync for Scheduler
impl Unpin for Scheduler
impl UnsafeUnpin for Scheduler
impl UnwindSafe for Scheduler
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