Skip to main content

Notifications

Community site session details

Community site session details

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

Job Queue Entries | Prevent from running after service crashed

(1) ShareShare
ReportReport
Posted on by 10
Hello everyone,
I tested a little bit with the Job Queue Entries and found out that the job will run also after a service crash from the taskscheduler, after the service started up again.
 
Here a small example:
  • In our Enviroment it is important, that some of the jobs are running sequentially.
  • I tried to simulate a service crash in the nighttime to check, how the system reacts to this.
    • I stopped the service at 21:50 (9:50pm)
    • I set the Starting Time to 22:00 (10pm) and the End Time to 22:05 (10:05pm)
    • The earliest Start Date/Time was set to 27.05.2024 and 22:00 (10pm) automatically
    • I started the service again at 22:15 (10:15pm)
  • The job, which was timed for 22:00 (10pm) just started running after the service (TaskScheduler) booted up again.
 
My question is:
Is there any chance for me to prevent the jobs from running parallel, if my TaskScheduler crashes at randomly at nighttime and boots up after two or three hours?
 
Thanks in advance :)
  • gdrenteria Profile Picture
    17,613 Most Valuable Professional on at
    Job Queue Entries | Prevent from running after service crashed
    Hi
    Complementing what our colleague has commented, I give you a couple of interesting links, related to some considerations and strategies in managing job queues, in addition to identifying that we can also manage them via API, which allows us more control over them.
    BR
    GR
  • Suggested answer
    Tech_BC_Gokul Profile Picture
    331 on at
    Job Queue Entries | Prevent from running after service crashed
    Hi 

    You can create a Codeunit which will have all this codes are called in Sequentially and in the job queue scheduler you can start one codeunit and configure the same 
     
    that will run all the task in sequence if the one get failed then rest all the methods will be stopped automatically. 
     
    Thanks 
    Gokul

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,221 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,982 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans