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
I set a job executor per job, and set max_instances= 3, but I got EVENT_JOB_MISSED #296
Comments
and others work correctly! except utillization_collect doesn't work at between 03:17 and 05:00, (because I didn't receive the data). Is there something with it ? |
I don't know what the problem is, and frankly I cannot debug the issue given the materials you've presented. If you can build a simple reproducible test which I can run on my own, then I can try to figure it out for you. |
There is one thing to consider though, namely the |
@linxi-1214 Does this answer your question? |
@agronholm: is there a way to still execute the job even when it was missed? or are we supposed to add an EVENT_JOB_MISSED handler and execute it there? |
Why would you want it to be executed in such a case? Wouldn't you rather either disable the misfire grace time entirely or at least extend it? |
@agronholm: ah yeah, disabling the misfire grace time sounds like what I want. I want the basic "cron" behavior, where if I schedule an event at 02:00 and for some reason cron fails to run it at exactly 02:00, it still runs it at 02:01. Right now the default seems to simply discard jobs because they'd run 2 seconds late. Maybe you'd consider having it disabled by default to avoid unexpected behavior. |
@agronholm: it's not entirely clear what "disabled" means for Should I pass |
Yeah, I agree it's not obvious from the documentation. The correct value is |
In practice I recommend just setting a very high value anyway. Or do you really want a job to run when it's many months late? |
Thanks. Yeah I agree, a value like one hour makes more sense. |
APScheduler 4.0 will have a much more generous default for |
My code:
then add the jobs:
I want cpu_collect job run at 04:00, and it will run for about 1 hour.
The node_collect will run for about 1 minute, and utilization_collect run for about 1 minute too.
But the scheduler's logger shows:
last logger time is '03:17:12' , the next line show '05:08:51' suddenly, and tell me my job commit at 05:51, why ? and soon get missed , why?
I think the job will run in a single processor, and max_instances = 3 (actually only one instance will run ), so why my job got missed? Anywhere I config wrong? or some reason else?
Thanks !
The text was updated successfully, but these errors were encountered: