Thursday, January 7, 2016

How to Setup Job Queue in Microsoft Dynamics NAV 2013 R2


Let us first understand what we are going to discuss in the next 20 minutes of your precious time. Lot of people ping me asking about the Job Queue in Navision so I thought of writing an article about it so that I could give a clear picture of the working of Job Queue in Microsoft Dynamics NAV 2013 R2.


setup job queue in microsoft dynamics nav 2013 r2

Job Queue is a collection of Jobs which are running in the background which can schedule a Codeunit or a Report to run automatically in the background performing operations. Job Queue can be recurring or a one time thing. If no Job Queue is running then none of the Job Queue Entries will be running either. Job Queues can also be scheduled using NAS. 



Where can I find Job Queue in RTC?

In your Role Tailored Client, Follow the following hierarchy in the Left Menu Pane:

Departments -> Administration -> Application Setup -> Job Queue

department administration application setup job queue


job queue in microsoft dynamic nav 2013 r2



Configuring Job Queue


  • Job Queue run in Categories. Open the Job Queue Category List and Create a new Category as TEST.
create job queue category list in microsoft dynamics nav 2013 r2

  • Job Queue Entries are the lowest level in the hierarchy. Follow the steps below to setup Job Queue Entries:
  • configure job queue entry microsoft dynamics nav 2013 r2
    • Open the Job Queue Entries.
    • Click on New to create a New Job Queue Entry.
    • In this article we are setting up a Codeunit 50000 to Test Job Queue functionality, so we mention Codeunit in Object Type and enter 50000 in the Object ID. 
    • Mention the Category Filter as 'TEST'. Complete the form with required details and then Click OK.
    • Click on Set Status to Ready in the top menu bar.
    • Now you will see that the Status of the Job Entry will change from 'On Hold' to 'Ready'.
Note : The Job Entry which is created will not run even if its is in ready state as there is no Job Queue started or having Job Queue Category Filter as 'TEST'.




  • Now we have to Create a new Job Queue, for that follow the steps below:
    • create job queue header in microsoft dynamics nav 2013 r2
    • Open the Job Queue.
    • Click on New to Create a New Entry in the Job Queue.
    • Enter the Name and Description of the Job Queue and put the Job Queue Category Filter as 'TEST' and then click OK.




Running a Job Queue Manually

Click on the Job Queue and then Click on Start Job Queue. While running the Job Queue manually make sure that in the NAS Setting of the Job Queue, the Start Automatically From NAS is unchecked otherwise the Job Queue will not start manually.

start job queue manually in microsoft dynamics nav 2013 r2



Running a Job Queue using NAS

  • Open the specific Job Queue you want to schedule using NAS. Check the boolean Start Automatically From NAS.
  • Go to the Microsoft Dynamics NAV 2013 R2 Administration. Create a service specially for NAS scheduling of Job Queue.
  • In the NAS Services tab, fill the Startup Codeunit as 450 which the Codeunit for Job Queue. 

NAS Settings job queue microsoft dynamics nav 2013 r2


Thanks for reading the whole article. I hope you find the article useful. Please drop your comments below if you are having any problem in the process. To get more clarity regarding Job Queue Setup in Microsoft Dynamics NAV 2013 R2, watch the video below and Subscribe to our Youtube Channel.

   

2 comments:

  1. How do i set up multiple job queue at a same time.
    Suppose i have a 3 job queue entries:
    1 Report 50000 startup time 09:00 AM
    2 Report 60000 startup time 09:00 AM
    3 Report 70000 startup time 09:00 AM
    now i want to execute all 3 jobs at a same time.
    but its started any one, once one is completed then 2nd one is started and so on.
    could you tell me how can i start all at a same time.
    i created 2 services but still its run one by one.

    ReplyDelete
  2. The meaning of the Job Queues is as simple as the name suggests that the Job is Queued to run the objects one by one. It cannot start all at the same time. It is scheduled to run the objects one by one.

    ReplyDelete