-
-
Notifications
You must be signed in to change notification settings - Fork 110
Wrong weekday range #90
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
Comments
Well, 7 is an alias to day I removed it in already released |
Chiming in in support of the previous behavior after we got at least one bug report after upgrading - That same wiki page from the original post here indicates that 7 is allowed on some systems, and I think most Linux crontabs support it. |
I'll add that we can't change how our library handles cron expressions without making a major version bump ourselves. To avoid that, but still upgrade to croniter v4, we'll have to add code that I haven't fully thought through whether having the 7 be an alias for 0 is a good idea in a greenfield project, but since this isn't a greenfield project, and instead has many users, the upgrade to croniter v4 will likely cause bugs in lots of software that uses it, or else impose a burden as everyone who uses it who doesn't want to break things has to implement workarounds to preserve the historical behaviour. Regardless, @kiorky, you have my thanks for maintaining this useful project. |
(+1 re: thanks!) I thought about swapping in 0 for 7 as well but wasn't immediately sure if that would break "6-7" or not, haven't had a chance to test to confirm yet. Maybe swapping in the day of the week strings (6 => Sat, 7 = Sun, etc.)? |
On that specific point, please note that a major version bump has been done, 3->4. |
If you had took the time to read last changelog, and last changesets along that release, you would have been insured of what behavior to expect around the SUNDAY ranges which indeed need particular care. As of today, |
So as asked, DOW7 behavior is restored, and now documented and will stay as-is. |
pallets-eco/croniter#90 (comment) Now that the old behviour has been restored, we can continue using the latest version.
pallets-eco/croniter#90 (comment) Now that the old behviour has been restored, we can continue using the latest version.
The weekday range should be 0-6 as specified in Cron. However, croniter is accepting
7
as a valid weekday value.Current:
Expecting:
The line causing the error seems to be: https://github.com/kiorky/croniter/blob/4d6bb9747ddaaaf5cf44af7e4e821065cf9969fa/src/croniter/croniter.py#L140
The text was updated successfully, but these errors were encountered: