- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Scheduler Odd behavior #35
Comments
Im not totally sure what you mean here. Is it if the jobs are not being cleared fast enough eventually it stops working? And what do you mean by the "schedule is removed"?
Did you delete the database? The last scheduled date is stored in the database. |
And what do you mean by the "schedule is removed"?
Yes, I had to delete the last scheduled entry in the database for the job to start running again. The last scheduled date never got updated even though it was in the past. |
Do you not mean `2024-10-22 02:20:00 +0000 given it is every 5 minutes and not 5 seconds? Can you try and replicate this with #36 and see if the output gives us a better idea what is going on. |
Yes,
I will try later and will report back. Thank You! |
Worked out what this is. Should be fixed by #38 |
I apologize I have been active as of late. I have been trying to figure out the best way to reproduce this bug. It looks like you just opened a PR to fix it. |
Fixed in beta5 |
I have been testing SwiftJobs for the last few weeks on GCP and noticed a funny behavior with the onMinutes scheduler. I think this is true for all the on functions because the implement the same API.
If an instance gets behind, the job will never get executed until the permitted schedule is removed from the database and the service is restarted. Most folks will not see this issue if there is at least one Job with the every interval scheduled (i.e .everyMinute(), .everyHour e.t.c)
value in the Postgres Database
After deleting the persisted schedule and restarted the container, the following is printed
The schedule is as follows:
I was expecting the next scheduled to be
2024-10-22 02:17:05 +0000
since the job is supposed to run every 5 minutes.I think popping the first value in the queue is what's causing last issue from this list. I am trying to debug what's causing the job to never catch up.
The text was updated successfully, but these errors were encountered: