Skip to main content

Microsoft Dynamics NAV 2015 - How to Setup NAS & Job Queue

Hi All,

In today’s article we will see how we can setup NAS in Microsoft Dynamics NAV 2013, NAV 2013 R2 and NAV 2015.

Till Microsoft Dynamics NAV 2009, NAS used to come as a separate exe, which first need to be installed and then configured separately for Scheduling Jobs.

If you are looking NAS for NAV 2009 or Previous Refer here. 

If you are looking How To Setup Job Queue For NAV 2009 or Previous Refer here.

If you are looking How to Setup Job Queue and NAS in NAV 2016 Refer Video Here.

With NAV 2013 and Later Microsoft Changed the way how NAS is executed –

 - Now NAS is executed at the service tier.
 - NAS is now part of Microsoft Dynamics NAV Administration for configuration.

The Best Practice I would suggest to configure NAS is to create a Separate Service with –

- No Access to User. (Connection String is not shared)
- Service Account (Account used to run services) – Should have sufficient permission in SQL and Navision.

So let’s open Microsoft Dynamics NAV Administration and configure NAS.
** For the Demo I am using NAV 2015, but step remain same for NAV 2013 and NAV 2013 R2.



As you can see in above image, we have a Separate Tab for NAS configuration. Some parameters are known, but some are new. Let’s understand every Parameter.

Enable Debugging (If you want to debug NAS Session) - When this setting is enabled, the NAS services session waits 60 seconds before executing the first C/AL statement, to allow time for activating and attaching the NAV Debugger to the NAS services session.

Retry Attempts per Day - The NAS Services on a tenant is restarted after a failure up to the configured number of times in a 24 hour period. Once the limit is exceeded, it fails permanently.

Startup Argument – Yes we know it. The available options remain same as old days.
"ADCS, ADCSID=1"    OR “OSYNCH" OR “JOBQUEUE"

Startup Code unit – Specifies the codeunit that contains the method that will be called by the NASStartupMethod setting.

0:  NAS Services do not start.
1:  Run the trigger specified by the NAS Startup Method in codeunit 1.
450: Run codeunit 450 (Job Queue - NAS Start Up), and call the method specified by NASStartupMethod.

Startup Method – Specifies the method that will be called in the NASStartupCodeunit.

"": If no start method is specified (null string), the OnRun trigger is called.
StartNAS: NAS services runs the StartNAS method in the NAS Startup Codeunit.


If you are trying to replicate the Old NAS here are the Values –

Parameter
Value
Enable Debugging
Based on Requirement. (Default – FALSE)
Retry Attempts per Day
Based on Requirement. (Default – 3)
Startup Argument
JOBQUEUE
Startup Code unit
1
Startup Method
StartNAS

** Make sure that the new service which you configured is running with a domain account having sufficient permission on SQL and Navision. Change here as below, do not keep it Network service.

After this the configuration is completed. Let’s start Navision and Navigate to Job Queue.
.../Departments/Administration/Application Setup/Job Queue

First Thing we need to setup is Job Queue Category List. With the Category the Job Queue and Job Queue Entries are grouped. So Just add Code and Description as per your need.


Next is to create Job Queue Entries, which are same as of old days.


You can setup the parameters as you used to. 

 - Select the Report or Codeunit that you want to schedule. 
 - Select Parameter if required.
 - Select Job Queue Category Code Created above.
 - Other parameters are self explanatory. 
 - In The Next Tab (Recurrence) you can setup when you want to run the batch and also the start and end time when it should run on the selected day.
 - And between the Starting and Ending Time, how frequently you want to run (in minutes).

Next is to Create a Job Queues as shown below.


With NAV 2013 onwards, if you want to setup to run automatically then setup the NAS Settings Tab. 

If you are testing then Don’t configure the fields in the NAS Settings and for testing use Start Job Queue and Stop Job Queue from actions.

Once you setup you should see something like, which means Job Queue running.

You can check the status of Running jobs using ” Job Queue Log Entries”.


Hope you find the article useful. 

If you have any issues let me know.

Regards,
Saurav Dhyani

Comments

Popular posts from this blog

BC 21 and Higher - PowerShell Cmdlet (Replacement of Business Central Administration).

Hi Readers, As discussed in last article about deprecating of Business Central Administration, there are few common actions that we use in administration till Business Central 20. For our on-prem customers, we will still require doing activities. As Microsoft suggest we need to start using PowerShell cmdlet.    Let's see how to do those via PowerShell, or Administration Shell. I will be keep adding commands as you comment to this article.

Send Mail with Attachment From Navision.

Hi all, We have seen how to save a report into PDF and how to send mail to a customer. Let's link these two post in one i.e. Mailing statement to a customer into PDF Format. This article is part of the Series. Please Refer  Table of Content here . If you have the old objects set let me brief you what I will be changing - 

MSDYN365BC - Data Upgrade To Microsoft Dynamics 365 Business Central on premises.

Hi Readers, We have already talked about the number of steps for upgrading to Business Central on Premises from different NAV versions. After that article, I received multiple requests for an article which list down steps for Data Migration. In this article, we will discuss steps of data migration to MSDYN365BC (on-Prem) from NAV 2017. For this article, I am considering a Cronus Demo Database without any customization. For an actual upgrade project, we will have to complete object merge using compare and Merge process. After the Merge Process, the next step is data migration. Let's discuss those steps. Direct Upgrade to Microsoft Dynamics 365 Business Central (on-Prem) is from following versions - 1. NAV 2015. 2. NAV 2016. 3. NAV 2017. 4. NAV 2018.