-
Notifications
You must be signed in to change notification settings - Fork 56
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
Jobs scheduled at same time exclude each other. #19
Comments
Hello, Thank you for the report, what do you think about such implementation b4ad8fb Scheduler#next_jobs simply returns all jobs scheduled at the same time. |
I still feel that you have the possibility of missing jobs while spending time spinning up threads for a batch of jobs. Have a look at the implimentation in clockwork. |
Your changes are definitely an improvement however. |
The clockwork implementation is very simple and reliable. However, I would not want to do such cycle with frequent checks. It requires more CPU time, especially if there are a lot of scheduled jobs and high frequency of checks in the cycle (sleep_timeout option). I'd want the daemon to peacefully sleep until the time comes. I've improved the implementation by adding the |
Hey. I'm away till next week and will have a look at this then.
|
Does anyone still running into this? I have 3 jobs scheduled to run at the same time but none gets ran. I can hardly replicate this issue consistently. |
If two jobs are scheduled to execute at the same time, they may be missed.
Example
cronotab.rb
:Rather than simply taking the next job off the queue, crono should check which jobs have not been executed and which should be executed.
Psudo-code for the described logic:
The text was updated successfully, but these errors were encountered: