#cron-job #jobs #base #tokio #tool #next #cron-clock

cron_next

cron_next is a tool base on cron_clock and tokio, make it easy to use with cron jobs

1 unstable release

0.1.0 Apr 19, 2022

#29 in #cron-job

Download history 2/week @ 2024-01-22 9/week @ 2024-02-19 58/week @ 2024-02-26 71/week @ 2024-03-04 37/week @ 2024-03-11 8/week @ 2024-03-18 16/week @ 2024-03-25 21/week @ 2024-04-01 9/week @ 2024-04-08 40/week @ 2024-04-15 26/week @ 2024-04-22

97 downloads per month

MIT license

5KB
60 lines

Cron Next is a tool base on cron_clock and tokio, make it easy to use with cron jobs

Examples

let expression = "* * * * * ? *";
let mut cron = CronNext::new(expression, chrono::Local)?;
while let Some(time) = cron.next().await {
  println!("time: {:?}, {:?}", time, chrono::Local::now());
}
println!("if not a forever loop job, will stop finally");

lib.rs:

cron_next

cron_next is a tool base on cron_clock and tokio, make it easy to use with cron jobs

Dependencies

~4–11MB
~99K SLoC