Setting up Job Queues
Synchronizing regularly can be a time-consuming process. Job queues enable you to automate this process, as they can run automatically in the background. When you set up job queues, you can still synchronize manually, if necessary.
In Expense Management, the following recurring activities can be set up for any given job queue:
Activity | Description |
---|---|
Synchronizing with Continia Online | A synchronization with Continia Online will:
To synchronize with Continia Online using a job queue, follow the guide below, but use codeunit 6086305 CEM Online Mgt. instead. |
Sending approval emails | Expense Management can send regular emails to approvers to remind them about documents pending approval. This job can be set to run on a daily basis. Expense Management will send an email only if there are new documents to be approved, and the same email will never be sent twice in a day. To send approval emails using a job queue, follow the guide below, but use codeunit 6086313 Expense Approval E-Mail instead. |
Sending reminder emails | Expense Management can send reminder emails to expense users to remind them about pending documents. The reminder setup needs to be configured – otherwise no email will be sent. The reminder setup determines how many days should pass before a reminder email is sent out, and it can be configured for each user. To send reminder emails using a job queue, follow the guide below, but use codeunit 6086314 Reminder E-Mail instead. |
Sending status reports | Expense Management can also send a status report with detailed information about all documents claimed by a user. These documents can be either posted or open documents. If you would like to specify what details should be included in this report, go to Expense Management Setup, select the E-mail FastTab, and update Status Report Filters. The user will receive an email with a PDF document attached. To send status reports using a job queue, follow the guide below, but use codeunit 6086353 Send Expense Status Report instead. |
Update Field Dependencies | If you have set up field dependencies in Configured Fields, they need to be validated to avoid any conflicts. Normally, you would validate by selecting both Update System Dependencies and Consistency Check in Field Type Dependencies, but this Codeunit makes it possible to run a job queue with the check. To update field dependencies using a job queue, follow the guide below, but use codeunit 6086569 Update Field Dependencies instead. |
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:
- Choose the icon, enter Job Queue Entries, and then choose the related link.
- In the action bar, select New to open the Job Queue Entry Card.
- 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.
- In the field Object ID to Run, enter the relevant codeunit/report (see the table above).
- In Earliest Start Date/Time, specify the earliest date and time to start running the job queue.
- 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.
- 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.
- Fill out the remaining fields on the Recurrence FastTab as needed.
- In the action bar, select Set Status to Ready to start the job queue.
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.