We have a client for whom we piggyback some SignalR based travel information screens on the back of EPiServer 7.19. These travel info screens download information from third-party APIs via scheduled jobs, process the data, then send this to the webclients via SignalR for display.
It's important this data is fresh, so the jobs are set to run once per minute. However, we're seeing that this frequency is frequently missed, despite the jobs only taking seconds to run, resulting in complaints from the client about stale data. Here's an example of run times from earlier today, with intervals ranging from 1 minute to 3:
This is a mature site with quite a few scheduled jobs, and we're only running the scheduler on a single server in the farm, so I'm not sure if that's a factor. Does anyone know the answers to the following:
Job runs according to schedule defined in table tblScheduledItem but if one cycle have been missed and job was still running then it will be picked in next cycle (isRunning = 1 means job is running). Some how Job is still running. Is there any awaitable task in your signalR broadcasting? Adding some logging for processing time may help.
Picking this one back up after a bit of a gap. We've now enabled scheduled jobs on multiple nodes, but this doesn't seem to have improved the frequency of the scheduled jobs.
Job runs according to schedule defined in table tblScheduledItem but if one cycle have been missed and job was still running then it will be picked in next cycle (isRunning = 1 means job is running).
Yup, that's all familiar stuff - the question is how often do those cycles run? The UI lets me set scheduled job frequency down into the seconds, but I can't see the job in question reliably running any more frequently than once every two minutes. I haven't put timers on, but I have watched a run at 14:10, take around 5 seconds to complete, then not run again until 14:13, despite the next run being set for 14:11.
Interestingly, if I disable all other scheduled jobs in staging apart from the one I'm monitoring, it reliably runs once a minute, so I think there must be some undocumented built-in limiting on the number of jobs which are run concurrently, regardless of how many nodes the scheduler is running on.
Can anyone from EPiServer shed light on this situation? I don't suppose (hope of hopes) there's an undocumented config setting I could use to raise this threshold?
Not the exact solution you are looking for, but if you are willing to add some customised code, you can reliabliy setup the timer you want. The following blog post will be helpful.
I don't think that solves the problem - that just appears to just set the Next Execution time programmatically. The stated Next Execution time here is fine, but EPiServer isn't managing to achieve it.