---
title: "Codeunit 448 Job Queue Dispatcher"
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/448-job-queue-dispatcher/
type: codeunit
id: 448
name: "Job Queue Dispatcher"
app: "Base Application"
namespace: System.Threading
versions: "17-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/448-job-queue-dispatcher/source/29/"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 448 Job Queue Dispatcher

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/448-job-queue-dispatcher/

| | |
| --- | --- |
| App | Base Application |
| Namespace | System.Threading |
| Versions | 17-28 |
| Source file | Modules/System/JobQueue/JobQueueDispatcher.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| MockTaskScheduler | () | - | public | 17-28 | - | - |
| CalcNextRunTimeForRecurringJob | (var Record Job Queue Entry, DateTime) | DateTime | public | 17-28 | - | - |
| CalcNextRunTimeHoldDuetoInactivityJob | (var Record Job Queue Entry, DateTime) | DateTime | public | 17-28 | - | - |
| CalcNextReadyStateMoment | (Record Job Queue Entry) | DateTime | public | 17-28 | - | - |
| CalcInitialRunTime | (var Record Job Queue Entry, DateTime) | DateTime | public | 17-28 | - | - |
| AddMinutesToDateTime | (DateTime, Integer) | DateTime | public | 17-28 | - | - |
| WaitForOthersWithSameCategory | (var Record Job Queue Entry) | Boolean | public | 21-28 | - | - |
| ActivateNextJobInCategory | (var Record Job Queue Entry) | - | internal | 24-28 | - | - |
| IsWithinStartEndTime | (var Record Job Queue Entry) | Boolean | public | 27-28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnBeforeCalcNextRunTimeForRecurringJob | (Record Job Queue Entry, DateTime, var DateTime, var Boolean) | 17-28 | - | - |
| Integration event | OnAfterHandleRequest | (var Record Job Queue Entry, Boolean, Integer) | 17-21 | Pending 19.0 | WasSuccess boolean is always true. In event of error, use OnAfterLogError in JobQueueErrorHandler. |
| Integration event | OnBeforeHandleRequest | (var Record Job Queue Entry) | 17-28 | - | - |
| Integration event | OnBeforeExecuteJob | (var Record Job Queue Entry) | 17-28 | - | - |
| Integration event | OnAfterExecuteJob | (var Record Job Queue Entry, Boolean) | 17-21 | Pending 19.0 | WasSuccess boolean is always true. In event of error, use OnAfterLogError in JobQueueErrorHandler. |
| Integration event | OnBeforeRun | (var Record Job Queue Entry, var Boolean) | 17-28 | - | - |
| Integration event | OnBeforeWaitForOthersWithSameCategory | (var Record Job Queue Entry, var Record Job Queue Entry) | 17 | - | - |
| Integration event | OnCalcNextRunTimeForRecurringJobOnAfterCalcNewRunDateTime | (var Record Job Queue Entry, var DateTime, var Boolean) | 17-24 | - | - |
| Integration event | OnCalcInitialRunTimeOnAfterCalcEarliestPossibleRunTime | (var Record Job Queue Entry, var DateTime, var Boolean) | 17-28 | - | - |
| Integration event | OnBeforeWaitForOthersWithSameCategory | (var Record Job Queue Entry, var Record Job Queue Entry, var Boolean, var Boolean) | 18-28 | - | - |
| Integration event | OnAfterCalcRunTimeForRecurringJob | (var Record Job Queue Entry, Boolean, DateTime, var DateTime) | 19-28 | - | - |
| Integration event | OnAfterSuccessHandleRequest | (var Record Job Queue Entry, Integer) | 19-21 | - | - |
| Integration event | OnAfterSuccessExecuteJob | (var Record Job Queue Entry) | 19-28 | - | - |
| Integration event | OnRescheduleOnBeforeJobQueueEnqueue | (var Record Job Queue Entry) | 20-28 | - | - |
| Integration event | OnAfterSuccessHandleRequest | (var Record Job Queue Entry, Integer, Guid) | 22-28 | - | - |
| Integration event | OnCalcRunTimeForRecurringJobOnAfterInitDays | (var Record Job Queue Entry, var DateTime) | 22-28 | - | - |
| Integration event | OnCalcRunTimeForRecurringJob | (var Record Job Queue Entry, var Boolean, var Boolean, var Integer, var Integer) | 22-28 | - | - |
| Integration event | OnCalcNextRunTimeForRecurringJobOnAfterCalcNewRunDateTime | (var Record Job Queue Entry, var DateTime, var Boolean, DateTime) | 25-28 | - | - |
| Integration event | OnRescheduleOnBeforeJobQueueEnqueueAsWaiting | (var Record Job Queue Entry) | 27-28 | - | - |

## Source

Symbols: Microsoft.BaseApplication.symbols.437dbf0e-84ff-417a-965d-ed2bb9650972, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at a66254c3b8b5bb1cea290dc8f9d097aec4381153.

Jonas Paprotka, 2026-09-20.
