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

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 - 

Dynamics 365 Business Central 2021 release wave 2 (BC19) Released.

Hi Readers, As we all were expecting Microsoft have Released Business Central 2021 Release Wave 2 Today a.k.a BC19. In this article we will see what all is announced with the General Availability.  Starting Today Customers & Partners can start using Business Central 19. #msdyn365bc #bc19

Navision Cannot generate SSPI context State ID HY000

Hi all, Sometime while trying to connect database in classic client with windows authentication or connect to Role Tailored Client we face an error message. Error - The following ODBC error occurred: Error: [Microsoft][ODBC SQL Server Driver]Cannot generate SSPI context  State ID: HY000