Skip to content
New issue

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

Fail to parse standard cron #32

Open
JosiahParry opened this issue Nov 3, 2024 · 0 comments
Open

Fail to parse standard cron #32

JosiahParry opened this issue Nov 3, 2024 · 0 comments

Comments

@JosiahParry
Copy link

The following standard cron schedule fails to parse:

fn main() {
    let res = "0 0 * * 0".parse::<CronExpr>();
    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant