Crates.io | cron_next |
lib.rs | cron_next |
version | 0.1.0 |
source | src |
created_at | 2022-04-19 13:09:22.414165 |
updated_at | 2022-04-19 13:09:22.414165 |
description | cron_next is a tool base on cron_clock and tokio, make it easy to use with cron jobs |
homepage | |
repository | |
max_upload_size | |
id | 570297 |
size | 4,613 |
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");