Add functionality to limit missed runs. This should take care of #12. It also helps with #8, but it's not a full solution since it still "queues" a single missed run that executes immediately on the next tick.
The default is a single missed run because this is a safe value. Equivalent example:
let mut job = Job::new("0/1 * * * * *".parse().unwrap(), || {
println!("I get executed every 1 seconds!");
});
job.limit_missed_runs(1);
The original unlimited functionality can easily be turned back on.
let mut job = Job::new("0/1 * * * * *".parse().unwrap(), || {
println!("I get executed every 1 seconds!");
});
job.limit_missed_runs(0);
You can also set a custom limit.
let mut job = Job::new("0/1 * * * * *".parse().unwrap(), || {
println!("I get executed every 1 seconds!");
});
job.limit_missed_runs(99);
Add functionality to limit missed runs. This should take care of #12. It also helps with #8, but it's not a full solution since it still "queues" a single missed run that executes immediately on the next tick.
The default is a single missed run because this is a safe value. Equivalent example:
The original unlimited functionality can easily be turned back on.
You can also set a custom limit.