pub trait ScheduledTask: Sync + Send {
// Required methods
fn get_schedule(&self) -> Task;
fn on_time(&self, cancel: CancellationToken);
fn on_skip(&self, cancel: CancellationToken);
}Expand description
a task that can be scheduled
Required Methods§
Sourcefn get_schedule(&self) -> Task
fn get_schedule(&self) -> Task
get the schedule type
Sourcefn on_time(&self, cancel: CancellationToken)
fn on_time(&self, cancel: CancellationToken)
called when the task is scheduled
Sourcefn on_skip(&self, cancel: CancellationToken)
fn on_skip(&self, cancel: CancellationToken)
called when the task is skipped