bradymholt / cRonstrue

JavaScript library that translates Cron expressions into human readable descriptions
http://bradymholt.github.io/cRonstrue/
MIT License
1.29k stars 168 forks source link

Cronstrue parses invalid expression #198

Closed pconerly closed 3 years ago

pconerly commented 3 years ago

The expression /5 * * * * is parsed & accepted by cronstrue, but it should raise an error instead. Cronstrue also gives a strange output for the expression: Every 5 minutes, starting at minutes past the hour. For comparison, */5 * * * * produces Every 5 minutes.

I'm using cronstrue as an in-browser validator & descriptor of cron expressions in a form, but I need to make sure my form validates properly.

Love the project, thank you for writing it!

If you agree that this is a bug, would you accept a PR for it?

bradymholt commented 3 years ago

I have made the decision to not do exhaustive validation of cron expressions in this library. Please see the FAQ for details.

pconerly commented 3 years ago

That's fair, thanks for the answer @bradymholt