Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Job Queues scheduled to pass through midnight do not run

(0) ShareShare
ReportReport
Posted on by

Wanted to share a behavior that may not be that well known within the community. A very valued partner raised an issue with Microsoft that took us a while to understand what happened. A recurring job queue that is scheduled to run from 10:15 PM to 03:00 AM did only run two times. At the desired start time 22:15 and 23:15. After that, the job queue rescheduled itself to run again the next day from 22:15 and 23:15. 

First of all, there's a limitation on the active background task a tenant can run simultaneously. As you probably know, Job Queues create background tasks.


Here's an example:
JQ A is scheduled to run at 00:00 and it runs for 3 hours (00:00 - 03:00)
JQ B is scheduled to run at 00:00 and it runs for 3 hours (00:30 - 03:30)
JQ C is scheduled to run at 01:00 and it runs for 3 hours (01:00 - 04:00)

So now between 01:00 and 03:00 there'll be 3 running JQs, so other JQ will start even if it's scheduled.
Say, JQ D is scheduled to run at 01:30. But it won't start at 01:30. It will start at ~03:00 when JQ A finishes and release a "slot".

 In SaaS this is set to 3 which is the default setting in OnPrem environments as well:

Maximum number of scheduled tasks concurrently running.
-->
<add key="TaskSchedulerMaximumConcurrentRunningTasks" value="3" />
<!--

The Job Queue does not behave correctly if "Starting time" is after "Ending time". At some point this happens as per the schedule. The case when the timespan covers midnight isn't handled yet. However, the product group created repair items and added these to their backlog to improve Job Queue UI. The good news is that this is confirmed as undesired behavior and that this is something they would like to fix in future. The not so good news is that it does require a design change which cannot be handled as hot fix material / hot fix request to be raised via Microsoft CSS.

Hopefully this writing will help to understand the current behavior when you schedule the job queue to run pass through midnight.The workaround is easy to create the job queue to start at 0:15 AM to 04:00 AM as a sample. 

  • Verified answer
    Marga Profile Picture
    Marga 575 on at
    RE: Job Queues scheduled to pass through midnight do not run

    Thanks for sharing.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,317 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans