Job Queue Setup error in NAV 2013 R2 with multi-tenancy

Original URL…

I finally got this all working. There were a couple of separate issues. Starting the queue manually was failing due to some of our own code in the job queue dispatcher. Once that was resolved I still couldn’t get a queue to start automatically though. I discovered through trial and error that in a multi-tenant environment the Services Default Company is not actually where you want to put the default company. Instead, you must specify a Default Company when you mount the tenant in addition to enabling NAS services for that tenant. You must do this even if there is only 1 company within that tenant. Also, the Windows account running the service must be a user within the tenant – even if you aren’t using Windows Authentication for that service.

Now that it’s all set up though it works well – I can have 1 NAS service instance with all of the tenants mounted to it each with their own job queue, entries, and recurrences.

Anuncios

Use Job Queues to Schedule Tasks

Job queues in Microsoft Dynamics NAV enables users to schedule and run specific reports and codeunits. You can set jobs to run one time, or on a recurring basis. For example, you might want to run the Salesperson – Sales Statistics report weekly, to track sales by salesperson each week, or you might want to run the Process Service E-mail Queue codeunit daily, to make sure pending email messages to customers regarding their service orders are sent out in a timely manner.

Microsoft Dynamics NAV also has the following features that use job queues to automate repetitive tasks.

In the Job Queue Entries window, you add information about the job queue entry that you want to schedule, such as a report or codeunit for the object type, the name and object ID of the object that you want to run, recurrence, priority, and status. You can also add parameters to specify the behavior of the job queue entry. For example, you can add a parameter to only send posted sales orders. You must have permission to run the particular report or codeunit, or an error will be returned when the job queue is run. Errors are listed in the Job Queue Log Entries window. You can also troubleshoot job queue errors. Data generated when a job queue is run is stored in the database.

The following table describes a sequence of tasks, with links to the topics that describe them. These tasks are listed in the order in which they are generally performed. More…

Configuring “NAS” to use “Job Queue”

Original URL…
“One NAS can service multiple companies, but it does need a company to start up……”
Configuring NAS to use Job Queue
1) On the Server machine, start the Dynamics NAV Administration Console
2) Select the server instance and click the Edit button
3) Go to the NAS Services fast-tab
4) Set the Company field value to CRONUS International Ltd.
5) Set the Startup Codeunit field value to 450
Alternatively you can change the setup of step 5 to:
– Set the Startup Codeunit field value to 1
– Set the Startup Method field value to NASHandler
– Set the Startup Argument field value to JOBQUEUE
– Click Save
 
Remember to Configuring the Job Queue to use the NAS
Go to Job Queues list page
– In the NAS Settings fast-tab, set Start Automatically From NAS field value to TRUE
– Click the OK button to close the card
– Starting NAS
Select the server instance in the Dynamics NAV Administration Console
– Click Restart from the Action pane
Wait a few seconds to observe the Status field change to Running
…. based on original NAV Team Blog post:
“Background Posting and Job Queue in Microsoft Dynamics NAV 2013” by NAV Team Blog, nice post
http://blogs.msdn.com/b/nav/archive/2012/08/31/background-posting-and-job-queue-in-microsoft-dynamics-nav-2013.aspx