-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Timer reference to 'now' not reset on delete #206
Comments
Thank you for the bug report! I agree that looks incorrect. I'll work on adding a test to catch it and then fix the bug. |
robfig
pushed a commit
that referenced
this issue
Jul 11, 2019
Add a test to detect it and fix the bug. Fixes issue #206
I was able to reproduce and fix the bug. Thank you! |
Great thanks! I also just noticed a pr to add update functionality. I would imagine the same issue would occur here as well. |
haiheipijuan
pushed a commit
to haiheipijuan/cron
that referenced
this issue
Jun 15, 2021
Add a test to detect it and fix the bug. Fixes issue robfig#206
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the internal loop of the run method the local variable
now
is updated when a new entry is added but not deleted.https://github.com/robfig/cron/blob/v3/cron.go#L280
This results in the timer getting reset based an on outdated reference to now. Causing the trigger to later than specified.
https://github.com/robfig/cron/blob/v3/cron.go#L244
The text was updated successfully, but these errors were encountered: