How-ToAdministration

How to Configure the Job Queue in Business Central

Set up scheduled background tasks in Business Central using Job Queue Entries, including recurrence, codeunit selection, and error monitoring.

7 min read

The Job Queue runs tasks in the background on a schedule. It handles things like sending emails, running workflow automation, posting batch transactions, and synchronizing data with external systems. Rather than requiring a user to trigger these actions manually, the Job Queue runs them automatically at defined intervals.

Understanding how to create, monitor, and troubleshoot Job Queue Entries is a core part of administering a Business Central environment.


What Runs in the Job Queue

Common examples of processes that use the Job Queue:

  • Sending approval request emails
  • Posting recurring journal batches
  • Running the Calculate Depreciation batch job
  • Synchronizing with Dataverse or other integrations
  • Sending documents from the Email Outbox
  • Running workflow step processing

Some entries are created automatically when you enable certain features. Others you create manually.


Step 1: Access Job Queue Entries

  1. Search for Job Queue Entries using Alt + Q.
  2. You will see a list of all defined entries with their current status, Ready, On Hold, In Process, or Error.

Step 2: Create a New Job Queue Entry

  1. On the Job Queue Entries page, select New.
  2. Fill in the Object Type to Run field, in most cases this will be Codeunit.
  3. Enter the Object ID to Run. This is the codeunit ID that contains the logic you want to schedule. For example:
    • Codeunit 400, Send Emails (processes the email outbox)
    • Codeunit 5330, Dataverse Handling
    • Codeunit 2, Batch Post Sales Orders
  4. Optionally add a Description to identify the entry in the list.

Step 3: Set the Recurrence

  1. On the job entry card, locate the Recurrence section.
  2. Set Run on Mondays through Run on Sundays to define which days the job runs.
  3. Set the Starting Time and Ending Time to limit the window in which the job can execute.
  4. Set the No. of Minutes between Runs to control how frequently the job repeats within the allowed window. For example, entering 5 runs the job every 5 minutes.
  5. If the job should run only once, leave the recurrence fields blank and set an Earliest Start Date/Time.

Step 4: Configure Additional Options

Depending on the codeunit, you may have additional options:

  • Maximum No. of Attempts to Run, how many times Business Central retries the job if it fails before marking it as Error. A value of 3 is common.
  • Rerun Delay (sec.), how long to wait before retrying after a failure.
  • Job Queue Category Code, used to group related entries. You can define categories under Job Queue Categories.
  • Report Output Type, if the entry runs a report, set this to None, Print, or PDF as appropriate.

Step 5: Start the Job Queue Entry

New entries are created with a status of On Hold and will not run until you activate them.

  1. On the entry card, select Set Status to Ready from the action bar.
  2. The status changes to Ready, and the job will run at its next scheduled time.

To pause a running entry, select Set on Hold.


Step 6: Monitor Entries and Check Logs

The Job Queue Entries list shows real-time status. Entries with a status of Error require attention.

  1. Select an entry with Error status.
  2. Open Show Error from the action bar to read the error message.
  3. Review the details and correct the underlying issue (for example, a missing configuration or a permission problem).
  4. Select Set Status to Ready to restart the entry.

For a historical view of past runs, use the Job Queue Log Entries page.

  1. Search for Job Queue Log Entries using Alt + Q.
  2. Filter by Object ID, Status, or Start Date/Time to find relevant entries.
  3. Each log entry shows whether the run succeeded or failed, along with an error message if applicable.

Step 7: Delete or Archive Old Entries

Over time, completed one-time entries accumulate in the log. To keep the list manageable:

  1. Search for Job Queue Log Entries using Alt + Q.
  2. Select Delete Entries from the action bar.
  3. Set a date cutoff and confirm.

For recurring entries you no longer need, open the entry and set it to On Hold, then delete it from the list.


Common Issues

SymptomLikely Cause
Entry stuck in In ProcessSession crashed mid-run; set back to Ready manually
Entry shows Error immediatelyCodeunit ID is wrong or required setup is missing
Job runs but produces no outputCheck the codeunit logic and any related configuration
Emails not sendingEmail Outbox codeunit not scheduled or email account misconfigured

To schedule recurring journal posting through the Job Queue, see How to Set Up Recurring Journals in Business Central.