Skip to content
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

[fix] bug in schedule logic #38

Open
Menashe-zadara opened this issue Nov 14, 2024 · 0 comments
Open

[fix] bug in schedule logic #38

Menashe-zadara opened this issue Nov 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Menashe-zadara
Copy link

when a schedule is calculated the logic of Cron is described in the source:
/* the dom/dow situation is odd. '* * 1,15 * Sun' will run on the
* first and fifteenth AND every Sunday; '* * * * Sun' will run only
* on Sundays; '* * 1,15 * *' will run only the 1st and 15th. this
* is why we keep 'e->dow_star' and 'e->dom_star'. yes, it's bizarre.
* like many bizarre things, it's the standard.
*/

meaning the logic between day of month and day of week should be OR.

Actual behavior

the schedule calculates the next date which complies with DOW AND DOM ( '* * 15 * 1' will find next date which is a Sunday and the 15th of the month, instead of the next Sunday OR the next 15th of the month)

Expected behavior

find next date which complies either with DOM OR with DOW

@Menashe-zadara Menashe-zadara added the bug Something isn't working label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant