Automate recurring tasks with job queues
- 4 min.
Synchronizing and sending status and reminder emails regularly can be a time-consuming process. Job queues enable you to automate these processes, as they can run automatically in the background. This is a standard Business Central feature where you choose actions that Business Central should run on a regular basis. For more info, see the Microsoft guide on how to Use Job Queues to Schedule Tasks.
Expense Management has a set of recurring activities that can be set up for any given job queue:
Task ID | Description |
---|---|
Codeunit 6086305 | Synchronizing with Continia Online |
Codeunit 6086313 | Sending approval emails |
Codeunit 6086314 | Sending reminder emails |
Codeunit 6086353 | Sending status reports |
Report 6086312 | Batch Post Expenses |
Report 6086313 | Batch Post Mileage |
Report 6086314 | Batch Post Settlements |
Report 6086315 | Batch Post Per Diem |
Go to Job Queue Entries.
Select New.
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), and specify the Earliest Start Date/Time.
If you are setting up a report, enable the Report Request Page Options field to set options and filter criteria for the activity.
Note
When you've picked or entered a date, the Earliest Start Date/Time field is automatically filled 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 by enabling the recurrence toggle for each of the days you want it to run.
Select Process > Set Status to Ready once you've configured the job queue to your needs.
Important
The user who sets the job queue to ready must have the necessary permissions to run the activity. Business Central uses the permissions of the user who started the job queue when running the activity.
Once the job queue is set up and running, you can always see the log for each job queue by selecting the Job Queue and then selecting Log Entries on the Job Queue Entries list.