Closed alexxcons closed 9 months ago
I'd prefer not changing the meaning. I.e., printing out a warning is a good idea but I would not set the value to 1.
Also I believe the current interpretation is a little bit different:
*/500 */400 */31 */12 */300 MyCommand
is interpreted as
0 0 1 1 0 MyCommand
I'd prefer not changing the meaning. I.e., printing out a warning is a good idea but I would not set the value to 1.
Thanks for review! Alright, changed accordingly.
Merged, thank you for your contribution!
When using stepwise notation, there is no cron-error when a step-size is picked which is bigger than the max. value of the field. E.g. the following entry is valid:
*/500 */400 */31 */12 */300 MyCommand
And, as far as I can tell, will be interpreted as:* * * Jan *
A step size, which is bigger than the specified range actually does not make much sense, and it would be nice to see a warning, when used. In this PR I did a fallback to the default stepsize in that case ... hope that would be fine ?
Even though step-sizes bigger than (max-min)/2 do not make much sense, it is possible to use them in some way (see e.g. see here ). So I kept support for them, and used "max-min" to restrict step-size.
For testing, I used the attached cron files and did the following:
testfiles.zip