We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use croner::Cron; use chrono::Local; fn main() -> () { let count = 5; let start_time = Local::now(); let schedule = Cron::new("0 0 0 * * 7#2") .with_seconds_optional() .parse() .expect("failed to parse schedule string"); let events: Vec<_> = schedule .iter_from(start_time) .take(count) .collect(); println!("Next 5 events: {:?}", events); match schedule.find_next_occurrence(&start_time, true) { Ok(next) => println!("Next occurrence: {}", next), Err(e) => eprintln!("Error: {:?}", e), } }
results in =>
➜ hello_world git:(master) ✗ cargo run Compiling hello_world v0.1.0 (/Users/alex/dev/personal/hello_world) Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.29s Running `target/debug/hello_world` Next 5 events: [] Error: TimeSearchLimitExceeded
The text was updated successfully, but these errors were encountered:
Fixed in 2.0.8 https://github.com/Hexagon/croner-rust/releases/tag/v2.0.8
2.0.8
Sorry, something went wrong.
No branches or pull requests
Basic reproduction
results in =>
The text was updated successfully, but these errors were encountered: