Business Central job queue errors

By Emil Björk · Microsoft business apps consultant, Gothenburg

Why Business Central job queue entries fail or stall — Error status, stuck In Process, entries that never run, permission and user problems, overlapping jobs, sandbox copies, reports needing parameters — with fixes.

Published

Job queue entries fail quietly. Nobody is watching the page when the nightly cost adjustment errors out at 02:00, and the first symptom is a month-end that does not reconcile. This reference covers the ways entries fail or stall, where the real message is, and the setup that stops it recurring. The queue itself — categories, recurrence, telemetry — is covered in the job queue in Business Central.

Where the error is

A failed entry shows Status = Error. Open the entry card and choose Show Error, or open Job Queue Log Entries (filtered to the entry) for the history: one row per run with Start, End, Status, and Error Message. The message is whatever the codeunit or report raised — a posting error, a permission error, a runtime error — and is decoded in the same way as a user-facing error: posting setup errors, journal and document posting errors, and AL runtime errors.

If the log has no row for the time the job should have run, the job did not run at all, which is a different problem (below).

Entries that fail

Status = Error with a business message

Symptom. "Posting Date is not within your range of allowed posting dates", "The Gen. Posting Setup does not exist", "Item X is blocked".

Cause. The job posts documents or journals and hit the same validation a user would. Recurring journals scheduled through the queue are the usual source: the posting date range was not rolled forward, or a dimension value was blocked since the journal was set up.

Fix. Fix the data or setup, then set the entry back to Ready. The job re-runs at its next scheduled time, or immediately with Run Once.

Prevention. Put "check job queue log" in the daily finance routine, and set Maximum No. of Attempts to Run and Rerun Delay on entries whose failures are transient.

"You do not have the following permissions on TableData X"

Symptom. The entry fails on a permission error although the user who created it can run the process manually.

Cause. Scheduled runs execute as the user in the entry's User ID — the person who last set it to Ready — and that user's permission sets lack the object. Extensions that add tables without permission sets, or a user who created the entry with SUPER and later had it removed.

Fix. Set the entry to Ready as a user with the right permission set (a dedicated service account is the clean answer), or add the permission to that user's role. See Business Central permissions and security.

"The user does not exist" / entry fails after a leaver

Cause. The User ID on the entry belongs to a disabled or deleted user, or one whose licence was removed.

Fix. Re-set the entry to Ready under a service account; audit every entry's User ID when someone leaves.

Prevention. Create all job queue entries as a named service account with a stable licence, never as a person.

Lock and deadlock errors

Symptom. "The operation could not complete because a record was locked by another user" or "Your activity was deadlocked" in the log, at times when nobody is logged in.

Cause. Two job queue entries running simultaneously on overlapping tables — Adjust Cost and an inventory posting job, two recurring journals, a report and a batch — or a job overlapping with an integration writing through the API.

Fix. Give entries that touch the same tables the same Job Queue Category Code; entries in a category run one at a time. Space the schedules.

Prevention. One category per functional area (INVENTORY, GL, INTEGRATION) from the start.

"Maximum No. of Attempts to Run" exhausted

Cause. The entry has retried the configured number of times and given up; the underlying error is in the log.

Fix. Fix the cause, reset the entry to Ready.

Entries that never run

Status = Ready, Earliest Start Date/Time in the past, no log entry

Symptom. The entry looks scheduled but nothing happens.

Cause. In Business Central online the job queue is driven by scheduled tasks created when the entry is set to Ready. If the task was lost — after an environment copy, a restore, or an entry that was set to Ready in a session that was killed — no task exists and nothing will fire.

Fix. Set the entry On Hold and then Ready again to create a new scheduled task. The Job Queue Entries page's Restart action does the same.

Entries On Hold after copying or restoring an environment

Symptom. After copying production to a sandbox, or restoring, every entry is On Hold.

Cause. Deliberate. Business Central sets job queue entries On Hold in a copied or restored environment so a sandbox does not post, email, or integrate as if it were production.

Fix. In a sandbox, leave them on hold unless a specific test needs one; in a restored production environment, review the list and set the genuine jobs to Ready under the service account.

Prevention. Keep a documented list of production job queue entries and their schedules so a restore can be reconciled against it — Business Central environments covers copy and restore behaviour.

Stuck In Process

Symptom. The entry has shown In Process for hours or days; nothing is running.

Cause. The session executing the job ended without updating the status — an environment update at the scheduled update window, a platform restart, or the job exceeding a session limit. Entries do not recover from this by themselves.

Fix. Set the entry to Ready (Restart). Check the log to see whether the last run completed its work before dying; posting jobs are transactional per document, so partial batches are usually safe to rerun.

Prevention. Schedule long jobs away from the environment's update window, and set Job Queue Entry notifications so someone sees a stuck entry within hours rather than at month-end.

Recurring entry skips runs

Cause. Run on Mondays… flags unchecked for a day, a Starting Time / Ending Time window the job could not fit into because the previous run overran, or No. of Minutes between Runs set on a job that takes longer than that.

Fix. Check the recurrence fields on the card; widen the window or lengthen the interval.

Reports in the job queue

"The report cannot be run in the job queue because it has a request page" / report runs with wrong parameters

Cause. A report scheduled through the queue needs its request-page options saved with the entry — the Report Request Page action on the job queue entry card. Without them, the report runs with defaults or fails.

Fix. Open the entry, run Report Request Page, fill the options, save. For output, set Report Output Type (PDF, Excel, Word) and, if it should be sent, the printer or email setup.

Report never produces output

Cause. Output Type is None, or the printer name on the entry does not match a configured printer.

Fix. Check the entry's output fields; printers and print management covers cloud printing.

Codeunits in the job queue

"The Job Queue Entry cannot run codeunit X" / parameter string ignored

Cause. The codeunit's OnRun does not expect a Job Queue Entry record, so the Parameter String is not read; or the codeunit is not marked to run in the background context and prompts for confirmation, which fails without a UI.

Fix. Codeunits for the queue take Job Queue Entry as the TableNo and read "Parameter String"; wrap any Confirm in GuiAllowed checks.

Prevention. Test every queue codeunit with Run Once before scheduling it.

Monitoring so this stops being a surprise

Three settings turn the job queue from silent to observable. Job Queue Entry Card > Notifications sends a notification when an entry fails. Telemetry to Application Insights logs every job start, finish, and failure with the error and the object — Business Central telemetry and monitoring covers the setup and the KQL for "jobs that failed overnight". And the Job Queue Entries page itself, filtered to Status = Error or In Process, belongs on the administrator's role centre as a cue. Most job queue outages last exactly as long as it takes someone to look.

Frequently asked questions

Where is the actual error for a failed job queue entry?

In the Error Message field on the entry (open the card and use Show Error), and in the Job Queue Log Entries page, which keeps a row per run with the message. The message is the runtime error the job's codeunit or report raised — decode it with the posting and AL runtime error references.

Why is my job queue entry stuck In Process?

The session running it died — an environment update, a restart, a timeout — before it could set the status back. The entry will not restart itself. Set it to Ready (or use Restart), and if it happens after every update window, move the schedule away from the window.

Why does a job queue entry run for me but fail for the scheduled run?

Scheduled runs execute as the user recorded on the entry (the one who set it to Ready), not as you. If that user is disabled, has left, lost a licence, or lacks permissions on the objects the job touches, every scheduled run fails. Re-set the entry to Ready as a service account that has the permissions.

Can I run two job queue entries at once?

Yes, and that is often the problem. Entries without a Job Queue Category Code run in parallel and lock each other; put jobs that touch the same tables in one category so they run one at a time.

Further reading

Related guides

Browse every guide in Business Central or just Troubleshooting.

Spot something wrong or want a topic covered? Send a correction or a topic request — both are welcome.