Trait quartz_sched::Job
source · [−]pub trait Job: Send + Sync + 'static {
fn execute(&self, engine: Option<SchedulerHandle>);
fn description(&self) -> String;
fn key(&self) -> i64;
}
Expand description
Job is the trait that an implementor must conform to in order to be schedulable and runnable by the scheduler.
Required Methods
sourcefn execute(&self, engine: Option<SchedulerHandle>)
fn execute(&self, engine: Option<SchedulerHandle>)
execute is the method for executing the task. It gets called by the scheduler.
sourcefn description(&self) -> String
fn description(&self) -> String
description is user-defined description associated with the task.