-
Couldn't load subscription status.
- Fork 6
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Basic reproduction
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
Hexagon
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working