#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

#39 in #next

Download history 17/week @ 2024-07-15 49/week @ 2024-07-22 3/week @ 2024-07-29 10/week @ 2024-08-05 7/week @ 2024-08-19 40/week @ 2024-09-16 9/week @ 2024-09-23 8/week @ 2024-09-30 39/week @ 2024-10-07 18/week @ 2024-10-14 23/week @ 2024-10-21 29/week @ 2024-10-28

109 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
~98K SLoC