← All postsDevelopment ยท 3 November 2026

The job queue: how it works, how to monitor it, and why it stops

Most of what Business Central does unattended runs through the job queue: scheduled reports, batch posting, integrations, the e-document framework, agent processing. When it stops, things silently do not happen. How the job queue actually runs, the settings that matter, the failure modes, and a monitoring routine that catches a stuck queue before the business does.

The job queue is the part of Business Central that nobody thinks about until the 6am invoice run did not happen, the EDI orders did not come in, or the month-end report was never emailed. It is also where a lot of extension code runs. This is how it works and how to keep it working.

How it runs

A Job Queue Entry says what to run (a codeunit or a report, with a parameter string and optionally a record), when (a one-off date-time, or a recurrence pattern: days of the week, start and end times, minutes between runs), and under whose identity (the user who set it to Ready; see below). Business Central online runs a scheduler that picks up Ready entries whose time has come and executes each in its own background session. Each run writes a Job Queue Log Entry with the outcome. On error, the entry goes to Error status with the message, and depending on settings retries a number of times.

Three things follow that are not obvious. The job runs as the user who last set it to Ready, with that user's permissions and that user's company, language and settings; if that person leaves and their account is disabled, the job stops. Each run is a separate transaction, and an error anywhere rolls back the whole run. And there is no guarantee two scheduled jobs will not overlap, unless you set a Job Queue Category with a category code, which serialises entries in the same category.

Settings that matter

Running your own code on the queue

A codeunit with OnRun taking a Job Queue Entry record can be scheduled directly (the parameter string is yours to parse). For work triggered by a user action that should not block the session (send 500 emails, call a slow API), TaskScheduler.CreateTask queues a one-off background run of a codeunit with a failure codeunit; it is the right tool for "do this soon, not now" and it avoids the user waiting on a spinner. For both: make the work idempotent (a retried job must not post twice), log telemetry at start, end and error, and keep each run short enough that a failure loses little.

Why it stops

Monitoring that actually catches it

  1. Telemetry. Job queue events (start, finish, error, with the codeunit and duration) go to Application Insights. One alert on "job queue entry failed" and one on "no successful run of job X in the last N hours" (an absence alert) cover most of it. The second is the one that catches a queue that silently stopped.
  2. A daily glance. The Job Queue Entries page, filtered to Status = Error or On Hold, on the administrator's role centre. Thirty seconds.
  3. A canary. One tiny job that runs every fifteen minutes and writes a timestamp. If the timestamp is old, the queue is not running, whatever else the dashboard says.
  4. Log retention. Job Queue Log Entries grow; keep a few weeks and delete older ones with the retention policy.

If something did not happen last night and nobody can say why, the job queue log and the telemetry between them almost always can. If nobody in the business looks at either, that is the first fix, and it takes an afternoon.

Talk to us
Want this done in your Business Central?
Book a 30 minute callGet the monthly newsletter

More from the blog