---
id: object/codeunit/448
type: object
title: Codeunit 448 "Job Queue Dispatcher"
summary: Codeunit 448 "Job Queue Dispatcher" in Base Application (System.Threading). 9 public procedures, 14 events. Present since at least BC23, still in BC30, changed in BC24-25, BC27.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "27"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 414ff05376646a996fb8a6231830d2b1bb1b6ee5ab430deefbd6b3312f77051a
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Modules/System/JobQueue/JobQueueDispatcher.Codeunit.al
    title: src/Layers/W1/BaseApp/Modules/System/JobQueue/JobQueueDispatcher.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 448
name: Job Queue Dispatcher
namespace: System.Threading
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "25"
  - "27"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 33
  events: 14
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 3
  calls: 4
  called_by: 3
  implements: 0
---

# Codeunit 448 "Job Queue Dispatcher"

> Codeunit 448 "Job Queue Dispatcher" in Base Application (System.Threading). 9 public procedures, 14 events. Present since at least BC23, still in BC30, changed in BC24-25, BC27.

Base Application · System.Threading · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Modules/System/JobQueue/JobQueueDispatcher.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| TableNo | Job Queue Entry |
| Permissions | TableData "Job Queue Entry" = rimd, TableData "Job Queue Category" = rm |

## Events published

- `OnAfterCalcRunTimeForRecurringJob(var JobQueueEntry: Record "Job Queue Entry"; Found: Boolean; StartingDateTime: DateTime; var NewRunDateTime: DateTime)` (integration)
- `OnBeforeCalcNextRunTimeForRecurringJob(JobQueueEntry: Record "Job Queue Entry"; StartingDateTime: DateTime; var NewRunDateTime: DateTime; var IsHandled: Boolean)` (integration)
- `OnAfterSuccessHandleRequest(var JobQueueEntry: Record "Job Queue Entry"; JobQueueExecutionTime: Integer; PreviousTaskId: Guid)` (integration)
  - subscribers: [Codeunit 9803 "Job Queue Telemetry"](../codeunit/9803.md) SendTraceOnJobQueueEntryRequestFinishedSuccessfully
- `OnAfterSuccessExecuteJob(var JobQueueEntry: Record "Job Queue Entry")` (integration)
  - subscribers: [Codeunit 9803 "Job Queue Telemetry"](../codeunit/9803.md) SendTraceOnJobQueueEntryFinishedSuccessfully
- `OnBeforeHandleRequest(var JobQueueEntry: Record "Job Queue Entry")` (integration)
- `OnBeforeExecuteJob(var JobQueueEntry: Record "Job Queue Entry")` (integration)
  - subscribers: [Codeunit 9803 "Job Queue Telemetry"](../codeunit/9803.md) SendTraceOnJobQueueEntryStarted
- `OnBeforeRun(var JobQueueEntry: Record "Job Queue Entry"; var Skip: Boolean)` (integration)
- `OnBeforeWaitForOthersWithSameCategory(var CurrJobQueueEntry: Record "Job Queue Entry"; var JobQueueEntry: Record "Job Queue Entry"; var Result: Boolean; var IsHandled: Boolean)` (integration)
- `OnCalcNextRunTimeForRecurringJobOnAfterCalcNewRunDateTime(var JobQueueEntry: Record "Job Queue Entry"; var NewRunDateTime: DateTime; var IsHandled: Boolean; StartingDateTime: DateTime)` (integration)
- `OnCalcInitialRunTimeOnAfterCalcEarliestPossibleRunTime(var JobQueueEntry: Record "Job Queue Entry"; var EarliestPossibleRunTime: DateTime; var IsHandled: Boolean)` (integration)
- `OnRescheduleOnBeforeJobQueueEnqueue(var JobQueueEntry: Record "Job Queue Entry")` (integration)
- `OnRescheduleOnBeforeJobQueueEnqueueAsWaiting(var JobQueueEntry: Record "Job Queue Entry")` (integration)
- `OnCalcRunTimeForRecurringJobOnAfterInitDays(var JobQueueEntry: Record "Job Queue Entry"; var StartingDateTime: DateTime)` (integration)
- `OnCalcRunTimeForRecurringJob(var JobQueueEntry: Record "Job Queue Entry"; var RunOnDate: array[7] of Boolean; var Found: Boolean; var StartingWeekDay: Integer; var NoOfDays: Integer)` (integration)

## Procedures

- `IsWithinStartEndTime(var CurrJobQueueEntry: Record "Job Queue Entry"): Boolean`: Checks if the current time is within the start and end time of the job queue entry.
- `WaitForOthersWithSameCategory(var CurrJobQueueEntry: Record "Job Queue Entry"): Boolean`
- `MockTaskScheduler()`
- `ActivateNextJobInCategory(var JobQueueEntry: Record "Job Queue Entry")` (internal)
- `CalcNextRunTimeForRecurringJob(var JobQueueEntry: Record "Job Queue Entry"; StartingDateTime: DateTime): DateTime`
- `CalcNextRunTimeHoldDuetoInactivityJob(var JobQueueEntry: Record "Job Queue Entry"; StartingDateTime: DateTime): DateTime`
- `CalcNextReadyStateMoment(JobQueueEntry: Record "Job Queue Entry"): DateTime`
- `CalcInitialRunTime(var JobQueueEntry: Record "Job Queue Entry"; StartingDateTime: DateTime): DateTime`
- `AddMinutesToDateTime(SourceDateTime: DateTime; NoOfMinutes: Integer): DateTime`

Plus 10 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 472 "Job Queue Entry"](../table/472.md)

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 9803 "Job Queue Telemetry"](../codeunit/9803.md) (5 calls: `OnRun → SendJobQueueExpiredTelemetry`, `OnRun → SendJobQueueNotReadyToStartTelemetry`, `OnRun → SendJobQueueRescheduleAsWaitingTelemetry`, …)
- [Codeunit 53 "Translation Helper"](../codeunit/53.md) (4 calls: `SendTraceOnFailedToGetRecordBeforeFinalizingRecord → RestoreGlobalLanguage`, `SendTraceOnFailedToGetRecordBeforeFinalizingRecord → SetGlobalLanguageToDefault`, `SendTraceOnFailedtoGetRecordBeforeUpdatingStatus → RestoreGlobalLanguage`, …)
- [Codeunit 449 "Job Queue Start Codeunit"](../codeunit/449.md) (1 call: `HandleRequest → (object)`)
- [Codeunit 453 "Job Queue - Enqueue"](../codeunit/453.md) (1 call: `CleanupStaleJobs → (object)`)

## Called by

- [Table 472 "Job Queue Entry"](../table/472.md) (4 calls: `CleanupAfterExecution → CalcNextRunTimeForRecurringJob`, `CleanupAfterExecution → CalcNextRunTimeHoldDuetoInactivityJob`, `SetStatusValue → CalcInitialRunTime`, …)
- [Codeunit 110 "Consolidate Business Units"](../codeunit/110.md) (1 call: `RunConsolidation → (object)`)
- [Codeunit 456 "Job Queue Management"](../codeunit/456.md) (1 call: `RunJobQueueEntryOnce → (object)`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-25, BC27

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Job Queue Dispatcher")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
