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: set multi-weekdays bug about issue-590 #592

Merged
merged 2 commits into from
Oct 28, 2023

Conversation

XiXiangFiles
Copy link

@XiXiangFiles XiXiangFiles commented Oct 13, 2023

What does this do?

the root cause of this issue is wrong logic. it should use the weekday to calculate instead of a job.RunCount.
if job.RunCount run over the setting days and it'll encounter an error

Which issue(s) does this PR fix/relate to?

fix #590

List any changes that modify/break current functionality

only fix bugs for schedule. if it executes though all weekdays one time, the behavior will change.

ex: user sets. .Every(2).Weeks().Monday().Tuesday().At("10:00"). then after executing Monday and Tuesday, the bug will show up. In the next round, after executing on Monday it will wait 2 weeks for execution on Tuesday

Have you included tests for your changes?

yes, adjusted existing testing

Did you document any new/modified functionality?

n/a

Notes

@XiXiangFiles XiXiangFiles force-pushed the fix-issue-590 branch 4 times, most recently from 5cfa08f to 9a7b185 Compare October 13, 2023 18:25
@JohnRoesler JohnRoesler merged commit 5f95210 into go-co-op:v1 Oct 28, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When setting weeks interval greater than 1 with some weekdays, then the NextRun() method returns wrong time
2 participants