govo / cron_next_rs

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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");

About

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


Languages

Language:Rust 100.0%