pub trait JobBuilder<Args> {
Show 17 methods
// Required methods
fn new() -> Self;
fn and(&mut self) -> &mut Self;
fn repeat_seq(&mut self, n: u32, interval: Interval) -> &mut Self;
fn repeat_async(&mut self, n: u32, interval: Interval) -> &mut Self;
fn get_mut_cron_builder(&mut self) -> &mut JobScheduleBuilder;
fn get_mut_since(&mut self) -> &mut (i32, u32, u32, u32, u32, u32);
// Provided methods
fn at(&mut self, interval: Interval) -> &mut Self { ... }
fn since_every(&mut self, start: Interval, interval: Interval) -> &mut Self { ... }
fn every(&mut self, interval: Interval) -> &mut Self { ... }
fn from_to(&mut self, start: Interval, end: Interval) -> &mut Self { ... }
fn at_datetime(
&mut self,
year: Option<i32>,
month: Option<u32>,
day: Option<u32>,
hour: Option<u32>,
min: Option<u32>,
sec: Option<u32>,
) -> &mut Self { ... }
fn at_time(&mut self, hour: u32, min: u32, sec: u32) -> &mut Self { ... }
fn at_date(&mut self, year: i32, month: u32, day: u32) -> &mut Self { ... }
fn since_datetime(
&mut self,
year: i32,
month: u32,
day: u32,
hour: u32,
min: u32,
sec: u32,
) -> &mut Self { ... }
fn since_date(&mut self, year: i32, month: u32, day: u32) -> &mut Self { ... }
fn since_time(&mut self, hour: u32, min: u32, sec: u32) -> &mut Self { ... }
fn after(&mut self, delay: u64) -> &mut Self { ... }
}Required Methods§
Sourcefn repeat_seq(&mut self, n: u32, interval: Interval) -> &mut Self
fn repeat_seq(&mut self, n: u32, interval: Interval) -> &mut Self
The task will run n times in sequence. You need to specify the number and the interval between tasks.
Sourcefn repeat_async(&mut self, n: u32, interval: Interval) -> &mut Self
fn repeat_async(&mut self, n: u32, interval: Interval) -> &mut Self
Spawn n tasks at the same time. You need to specify the number and the interval between tasks.
Sourcefn get_mut_cron_builder(&mut self) -> &mut JobScheduleBuilder
fn get_mut_cron_builder(&mut self) -> &mut JobScheduleBuilder
Usually not use it directly, use at_* and since_* is better
fn get_mut_since(&mut self) -> &mut (i32, u32, u32, u32, u32, u32)
Provided Methods§
Sourcefn at(&mut self, interval: Interval) -> &mut Self
fn at(&mut self, interval: Interval) -> &mut Self
Specify a specific run time, equivalent to cron ‘n’
Sourcefn since_every(&mut self, start: Interval, interval: Interval) -> &mut Self
fn since_every(&mut self, start: Interval, interval: Interval) -> &mut Self
Specify a specific run time, equivalent to the corn expression ‘m/n’
Sourcefn every(&mut self, interval: Interval) -> &mut Self
fn every(&mut self, interval: Interval) -> &mut Self
Specify a specific run time, equivalent to the corn expression ‘0/n’
Sourcefn from_to(&mut self, start: Interval, end: Interval) -> &mut Self
fn from_to(&mut self, start: Interval, end: Interval) -> &mut Self
Specify a specific run time, equivalent to the corn expression ‘m-n’
Sourcefn at_datetime(
&mut self,
year: Option<i32>,
month: Option<u32>,
day: Option<u32>,
hour: Option<u32>,
min: Option<u32>,
sec: Option<u32>,
) -> &mut Self
fn at_datetime( &mut self, year: Option<i32>, month: Option<u32>, day: Option<u32>, hour: Option<u32>, min: Option<u32>, sec: Option<u32>, ) -> &mut Self
Specify a specific run time, the same as at
Sourcefn at_time(&mut self, hour: u32, min: u32, sec: u32) -> &mut Self
fn at_time(&mut self, hour: u32, min: u32, sec: u32) -> &mut Self
Specify a specific run time, the same as at
Sourcefn at_date(&mut self, year: i32, month: u32, day: u32) -> &mut Self
fn at_date(&mut self, year: i32, month: u32, day: u32) -> &mut Self
Specify a specific run time, the same as at
Sourcefn since_datetime(
&mut self,
year: i32,
month: u32,
day: u32,
hour: u32,
min: u32,
sec: u32,
) -> &mut Self
fn since_datetime( &mut self, year: i32, month: u32, day: u32, hour: u32, min: u32, sec: u32, ) -> &mut Self
Specify the datetime after which the task will start, the same as since
Sourcefn since_date(&mut self, year: i32, month: u32, day: u32) -> &mut Self
fn since_date(&mut self, year: i32, month: u32, day: u32) -> &mut Self
Specify the date after which the task will start, the same as since
Sourcefn since_time(&mut self, hour: u32, min: u32, sec: u32) -> &mut Self
fn since_time(&mut self, hour: u32, min: u32, sec: u32) -> &mut Self
Specify the time after which the task will start, the same as since
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.