cloudflare / cloudflare/saffron

Fail to parse standard cron

Open
#32 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
249
Forks
19
PR merge metrics
No merged PRs in 30d

Description

The following standard cron schedule fails to parse:
```rs
fn main() {
let res = "0 0 * * 0".parse::();
let description = res.unwrap().describe(English::default()).to_string();
println!("{description}");
}
// thread 'main' panicked at src/main.rs:9:27:
// called `Result::unwrap()` on an `Err` value: CronParseError(())
```
it should read something like "At midnight every sunday". However `"0 0 * * 1"` results in the correct value even though the `1` represents monday.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.