-
Notifications
You must be signed in to change notification settings - Fork 96
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
> Why does get_next() return a real day for the incorrect cron expression? (1 jan for '0 0 0 0 0') #6
Comments
expected and historic behavior or croniter: https://github.com/kiorky/croniter/blob/master/src/croniter/croniter.py#L108 day=0 and month=0 are aliased and expanded to day=1 month=1 |
( this was at the time of the write to support most UNIX expressions formats in the wild, see https://en.wikipedia.org/wiki/Cron) |
Sorry, I don't see any format that takes 0 as month. Could you please point to that explicitly? |
it's not for months but to support seconds repeat where in this case, fields are then shifted up to 6 and the 4th field becomes the day one. As this case is pretty straightforward, i added some rule to check in in the new released Believe me, cron corner cases are infinite and using misformed crontabs expression will still always give you opportunity for bad ranges. |
Thanks a lot! |
This is not what the OP saidf in the first place, the OP said in the first place that is_valid returns True which is legit.
Originally posted by @kiorky in #5 (comment)
The text was updated successfully, but these errors were encountered: