Setting up Job Queues

Carrying out complicated and laborious tasks on a regular basis, such as importing large numbers of documents and recognizing fields in all of them, may be a time-consuming process. Job queues enable you to automate such processes, as they can run automatically in the background. Setting up automatic job queues doesn't preclude you from carrying out related tasks manually at the same time. For example, when you set up a job queue for document import, you can still import documents manually as well, if necessary.

In Continia Document Capture, job queues can be set up for the following recurring activities:


ActivityDescription
Importing documentsYou can have documents imported automatically on a regular basis.

To do this using a job queue, follow the guide below, using codeunit 6085669 CDC Run Doc. Importer from JQ.
Batch-registering documentsIt's possible to register all documents in the document journal that are OK and for which there are no warnings or errors.

To batch-register documents using a job queue, follow the guide below, using report 6085580 CDC Batch Register Documents.
Automatic document matchingDocuments can be matched automatically in bulk on a recurring basis.

To do this using a job queue, follow the guide below, using codeunit 6086022 CDC Batch Match Documents
Sending status emails to approversDocument Capture can send reminder emails to users who need to approve one or more documents.

To send such emails to approvers using a job queue, follow the guide below, using codeunit 6085712 CDC Purch. Approval E-Mail.
Batch-posting purchase invoicesYou can have all purchase invoices with the status Released posted in bulk.

To post purchase invoices using a job queue, follow the guide below, using report 6085585 CDC Batch Post Purch. Invoices. From Microsoft Dynamics NAV 2018, run report 497.
Batch-posting purchase credit memosSimilarly to the above, Document Capture can automatically post all purchase credit memos with the status Released in bulk.

To post purchase invoices using a job queue, follow the guide below, using report 6085586 CDC Batch Post Purch. CMs. From Microsoft Dynamics NAV 2018, run report 498.

To set up job queues

As indicated above, you can use job queues to schedule and run many different tasks and processes. The setup procedure is always the same – only the codeunits/reports are different.

To set up a job queue, follow these steps:

  1. Choose the Search icon, enter Job Queue Entries, and then choose the related link.
  2. In the action bar, select New to open the Job Queue Entry Card.
  3. On the General FastTab, go to Object Type to Run and select the relevant type, depending on whether you're running a codeunit or a report.
  4. In the field Object ID to Run, enter the relevant codeunit/report (see the table above).
  5. In Earliest Start Date/Time, specify the earliest date and time to start running the job queue.
  6. When you've picked or entered a date, the Earliest Start Date/Time field is autofilled with the default time of day, but you can change this if necessary.
  7. On the Recurrence FastTab, specify the recurrence rate of the job queue (if any) by enabling the recurrence toggle for each of the days you want it to run.
  8. Fill out the remaining fields on the Recurrence FastTab as needed.

Important

Specifically for document import: Note that you shouldn't run document import queues too often. The process is I/O- and CPU-intensive, and running it too often is likely to result in locking issues and a general decline in the NAV Service Tier performance, especially when many documents are imported at the same time.

Conversely, running document import queues too rarely may result in the accumulation of very large numbers of documents that take a long time to import, thereby clogging up the system and blocking it for other users and processes when the queue is finally run. This applies in particular if you generally receive large quantities of documents. If that's the case for you, you may want to schedule document import to take place outside of business hours.

The optimal interval between queue runs depends entirely on your specific business setup, not least in terms of incoming document volume. We recommend filling in No. of Minutes between Runs on the Recurrence FastTab with a value that reflects your particular environment.

Note

Job queues sometimes fail, for example due to interrupted communication with an essential external resource that's become unresponsive, eventually resulting in an error status. To avoid this, we recommend that you fill in the fields Maximum No. of Attempts to Run and Rerun Delay (sec.), which are located on the General FastTab. Note that you may have to select Show more for these fields to become visible.

See also

Microsoft's article on job queues