As more of our clients are going live with NAV2017, we’re finding some inconsistencies on the features that were working as we thought it should, verses the way it’s working now.
One of such feature is the Job Queue function. Note that this only applies to NAV 2017, they’ve since rewrote how this process works in NAV 2018.
The purpose of a job queue is to run processes automatically at a preset time. For the process to run continuously, you would need to set the job to run as Recurring.
If you do not set the job queue entry as recurring, it would delete the Job Queue Entry because the process is only a one time deal. This feature was added because the users are now allowed to schedule their reports using job queue. Some reports/processes only needed to be ran once for the user.
After the clients went live, we started noticing the jobs that were set to recurring was being deleted as well. This confused the hell out of us because there were nothing on MSDN that talks about Job Queue Entries that are deleted when it’s set to Recurring.
Digging into this, the problem is on Codeunit 453 – Job Queue – Enqueue. More specifically, a function called RemoveFailedJobs.
Looking at this, the system will remove any Job Queue Entry records that it runs into an error. So this means that at any given point if your mission critical job fails, it’ll simply remove it from running ever again…
Yes, I could’ve setup notifications to warn you if something failed… I didn’t need to do this extra step before..
This is a steep contrast to how Dynamics NAV Job Queue ran before. In addition, this is not how NAV 2018 behaves now.
You can comment out the code completely or just add the following code:
Doing this, the process will leave the jobs that are set to Recurring alone.
I’m not sure if Microsoft has address this in the later CU releases for Dynamics NAV 2017, but if not, I would highly recommend you modify the code so your mission critical processes does not simply disappear!