A failing batch job in Dynamics 365 Finance & Operations is one of the most common support tickets, and one of the most common to be closed with “could not reproduce”. The job fails at 02:00, nobody looks until 09:00, and by then the error message has scrolled away. This checklist takes about twenty minutes and resolves most cases without a ticket, or turns the ticket into one that can actually be answered.
1. Read the actual error, not the status
Open the batch job, go to the batch job history, and read the log for the failed task, not the summary. “Error” tells you nothing. The log usually names the record, the company and the exception. Copy it before it ages out.
2. Check whether it is one record or the whole job
Many “failed” jobs processed thousands of records and failed on one. If the log names a specific invoice, journal or item, the fix is data, not the job. Correct the record and re-run.
3. Look for overlap
Two jobs touching the same tables at the same time block each other and one times out. Compare scheduled start times and typical durations in the batch history. Space them out or chain them with dependencies instead of running them in parallel.
4. Check the batch group and server assignment
A job assigned to a batch group with no active server simply waits, which looks like failure. Confirm the batch group has at least one server and the server is active.
5. Check recent changes
Did a Microsoft update wave land last week? Did someone change a parameter, a number sequence, a posting profile or a security role? The timing of the first failure is the biggest clue. Most “sudden” failures follow a change.
6. Check duration trend, not just failures
A job whose runtime has doubled over six months will start failing on time-outs. The batch history shows the trend. That is a tuning task: indexes, filters, splitting the job by company or by range.
7. Check the recurrence and the end date
Jobs set up at go-live with an end date, or a recurrence that stopped after a daylight-saving change, stop silently. Not glamorous, surprisingly common.
What to put in the ticket if you still need one
- Job name, batch group, company, and the exact log text
- First failure date and what changed around it
- Whether it fails on every run or on specific records
- Runtime trend over the last three months
A ticket with those four items is answered in hours. A ticket that says “the posting job failed again” is answered with questions.
Three real patterns and their fixes
The job that fails every Monday
A weekend job that recalculates inventory runs for longer on Sundays because of the week’s data, and overlaps the Monday posting batch at 02:00. One locks the other and the posting batch fails. The fix is scheduling: start the recalculation earlier or chain the posting batch to run after it. No code involved.
The job that fails on one company
A multi-company batch processes four legal entities and fails on the third every time. The log names a journal in that company with a dimension that was made inactive last month. Reactivate or correct the dimension, re-run, and add a check to the month-end checklist.
The job that stopped without failing
A statement import that ran daily for two years shows no failures and no runs since a date three weeks ago. The recurrence had an end date set at go-live. Nobody noticed because “no failures” looked like success. Review recurrences without end dates and set an alert on jobs that have not run when expected.
Preventing the ticket in the first place
- Keep a one-page map of the nightly schedule: job, start time, typical duration, dependencies
- Review batch durations monthly and tune anything whose runtime has grown by half
- Set alerts for jobs that fail and for jobs that did not run
- Test each Microsoft update wave against the batch schedule in a sandbox before production
- Give one named person ownership of the schedule; shared ownership means no ownership
Most organisations that do these five things stop raising batch job tickets altogether, which frees support time for things that actually need it.
Want someone who reads the logs before you do? See our support arrangement or book a consultation.
Frequently asked
Why do batch jobs fail only at night?
Because that is when several jobs run at once and compete for the same tables, and when nobody is watching. Spacing the schedule and chaining dependent jobs removes most night-time failures.
Can a Microsoft update wave break batch jobs?
Occasionally, especially for jobs built on custom classes. Testing each release in a sandbox against your batch schedule before production catches it.
Should we restart a failed job immediately?
Only after reading the log. Restarting a job that failed on a data error will fail again; restarting one that failed on a lock usually succeeds.
