-
Notifications
You must be signed in to change notification settings - Fork 12
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
Decimal values do not cause an error #291
Comments
I'll take a look, not sure right now if decimal numbers are allowed / non-standard tbh. |
So I'd guess the step value should be an integer, less than the maximum allowed value for that field and also be a even divisor (modulus = 0)? |
It seems hard to find a definite answer to what's supposed to be allowed for step values. I noticed that crontab.guru think's Although there's no source cited, Wikipedia also includes a note about frequency:
I think rejecting step values that's not an integer between 1 and maximum allowed value is the right thing to do and is what I'm looking for at least. Having the extra modulus check is a bonus I guess to not give surprises to the user, maybe as an opt-in. |
Just to pick up on the above comment this is currently causing a few issues with some validation I'm attempting to do where |
An update from my side: |
While testing some edge cases for our app, I have discovered that cron-validate allows values with decimals. Tested in Node v20 REPL:
To my knowledge, this isn't valid cron syntax - at the very least I believe it would be non-standard?!
The text was updated successfully, but these errors were encountered: