---
id: object/codeunit/456
type: object
title: Codeunit 456 "Job Queue Management"
summary: Codeunit 456 "Job Queue Management" in Base Application (System.Threading). 15 public procedures, 3 events, 4 event subscribers. Present since at least BC23, still in BC30, changed in BC24-25, BC27, BC30.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "30"
  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: 7d5d47b39d7542c0a97959592ca60b7c1730c6035a303a99bc7d9488828c492a
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Modules/System/JobQueue/JobQueueManagement.Codeunit.al
    title: src/Layers/W1/BaseApp/Modules/System/JobQueue/JobQueueManagement.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/12117
object_type: codeunit
object_id: 456
name: Job Queue Management
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"
  - "30"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 32
  events: 3
  subscribers: 4
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 4
  called_by: 14
  implements: 0
---

# Codeunit 456 "Job Queue Management"

> Codeunit 456 "Job Queue Management" in Base Application (System.Threading). 15 public procedures, 3 events, 4 event subscribers. Present since at least BC23, still in BC30, changed in BC24-25, BC27, BC30.

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

## Events published

- `OnGetCheckDelayInMinutes(var DelayInMinutes: Integer)` (integration): Used for test. Sets the minimum age of stale job queue entries and job queue log entries.
- `OnRunJobQueueEntryOnceOnAfterJobQueueEntryInsert(SelectedJobQueueEntry: Record "Job Queue Entry"; JobQueueEntry: Record "Job Queue Entry")` (integration)
- `OnFindStaleJobsAndSetErrorOnAfterSetError(var JobQueueEntry: Record "Job Queue Entry")` (integration)

## Event subscriptions

- ScheduleReport subscribes to Codeunit "Reporting Triggers" ScheduleReport
- OnStatusChanged subscribes to Table "Job Queue Entry" OnAfterModifyEvent
- OnBeforeDeleteJobQueueEntry subscribes to Table "Job Queue Entry" OnBeforeDeleteEvent
- OnBeforeDeleteJobQueueLogEntry subscribes to Table "Job Queue Log Entry" OnBeforeDeleteEvent

## Procedures

- `CheckUserInJobQueueAdminList(UserName: Text): Boolean` (internal)
- `CreateJobQueueEntry(var JobQueueEntry: Record "Job Queue Entry")`
- `DeleteJobQueueEntries(ObjectTypeToDelete: Option; ObjectIdToDelete: Integer)`
- `StartInactiveJobQueueEntries(ObjectTypeToStart: Option; ObjectIdToStart: Integer)`
- `SetJobQueueEntriesOnHold(ObjectTypeToSetOnHold: Option; ObjectIdToSetOnHold: Integer)`
- `SetRecurringJobsOnHold(CompanyName: Text)`
- `SetStatusToOnHoldIfInstanceInactiveFor(PeriodType: Option Day,Week,Month,Quarter,Year; NoOfPeriods: Integer; ObjectTypeToSetOnHold: Option; ObjectIdToSetOnHold: Integer): Boolean`
- `RunJobQueueEntryOnce(var SelectedJobQueueEntry: Record "Job Queue Entry")`
- `CheckAndRefreshCategoryRecoveryTasks()`
- `FindStaleJobsAndSetError()`: To find stale jobs (in process jobs with no scheduled tasks) and set them to error state. For both JQE and JQLE
- `UpdateRetriableFailedJobQueueLogEntry(var JobQueueEntry: Record "Job Queue Entry")` (internal)
- `TooManyScheduledTasksNotification()` (internal)
- `GetScheduledTasks(): Integer` (internal)
- `GetScheduledTasksForUser(UserId: Guid): Integer` (internal)
- `TooManyScheduledTasksDocs(ScheduledTaskNotification: Notification)` (internal)

Plus 10 local procedures.

## Triggers

OnRun

## 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: `OnStatusChanged → SetJobQueueTelemetryDimensions`, `RunJobQueueEntryOnce → SetJobQueueTelemetryDimensions`, `StaleJobQueueEntryTelemetry → SetJobQueueTelemetryDimensions`, …)
- [Codeunit 448 "Job Queue Dispatcher"](../codeunit/448.md) (1 call: `RunJobQueueEntryOnce → (object)`)
- [Codeunit 450 "Job Queue Error Handler"](../codeunit/450.md) (1 call: `RunJobQueueEntryOnce → (object)`)
- [Codeunit 9026 "User Login Time Tracker"](../codeunit/9026.md) (1 call: `SetStatusToOnHoldIfInstanceInactiveFor → AnyUserLoggedInSinceDate`)

## Called by

- [Codeunit 461 "Job Queue Cleanup Tasks"](../codeunit/461.md) (3 calls: `CleanupJQTasks → CheckAndRefreshCategoryRecoveryTasks`, `CleanupJQTasks → FindStaleJobsAndSetError`, `OnRun → UpdateRetriableFailedJobQueueLogEntry`)
- [Codeunit 841 "Cash Flow Management"](../codeunit/841.md) (3 calls: `CreateAndStartJobQueueEntry → CreateJobQueueEntry`, `DeleteExistingSetup → DeleteJobQueueEntries`, `DeleteJobQueueEntries → DeleteJobQueueEntries`)
- [Codeunit 1852 "Sales Forecast Scheduler"](../codeunit/1852.md) (2 calls: `CreateJobQueueEntry → CreateJobQueueEntry`, `RemoveScheduledTaskIfUserInactive → DeleteJobQueueEntries`)
- [Codeunit 1956 "LPP Scheduler"](../codeunit/1956.md) (2 calls: `CreateJobQueueEntry → CreateJobQueueEntry`, `RemoveScheduledTaskIfUserInactive → DeleteJobQueueEntries`)
- [Codeunit 441 "Prepayment Mgt."](../codeunit/441.md) (2 calls: `CreateAndStartJobQueueEntry → CreateJobQueueEntry`, `CreateAndStartJobQueueEntry → DeleteJobQueueEntries`)
- [Codeunit 454 "Job Queue - Send Notification"](../codeunit/454.md) (2 calls: `SendNotificationWhenJobFailed → CheckUserInJobQueueAdminList`, `ShowMoreDetailForMultipleFailedJobs → CheckUserInJobQueueAdminList`)
- [Codeunit 737 "VAT Report Mgt."](../codeunit/737.md) (2 calls: `CreateAndStartAutoUpdateVATReturnPeriodJob → CreateJobQueueEntry`, `CreateAndStartAutoUpdateVATReturnPeriodJob → DeleteJobQueueEntries`)
- [Codeunit 9112 "Job Queue Activities"](../codeunit/9112.md) (2 calls: `OnRun → GetScheduledTasks`, `OnRun → GetScheduledTasksForUser`)
- [Codeunit 4114 "Price List Line Sync"](../codeunit/4114.md) (1 call: `StartSync → CreateJobQueueEntry`)
- [Codeunit 842 "Cash Flow Forecast Update"](../codeunit/842.md) (1 call: `RemoveScheduledTaskIfUserInactive → DeleteJobQueueEntries`)
- [Codeunit 8912 "Environment Cleanup Subs"](../codeunit/8912.md) (1 call: `ClearCompanyConfigGeneral → SetRecurringJobsOnHold`)
- [Page 3845 "Scheduled Tasks"](../page/3845.md) (1 call: `OnOpenPage → TooManyScheduledTasksNotification`)
- [Page 672 "Job Queue Entries"](../page/672.md) (1 call: `OnOpenPage → TooManyScheduledTasksNotification`)
- [Page 9102 "Job Queue Tasks Activities"](../page/9102.md) (1 call: `UpdateJobQueueCountAndStyleExpr → CheckUserInJobQueueAdminList`)

## Recent changes

- 2026-10-02 [#12117 [Job Queue] Clearer message and attempt number for runs interrupted by the platform](../../changes/bcapps/12117.md) (main, BC30, feature)

## Across versions

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

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 Management")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
