1 unstable release
0.1.0 | Apr 19, 2022 |
---|
#39 in #next
109 downloads per month
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