Dynamics 365 Finance Batch Jobs That Block Each Other at Period Close

How to sequence settlement, foreign currency revaluation, consolidation and inventory close with batch groups, task constraints, priorities and time windows, how to read the blocking, and what to check before the next quarter end.

When settlement, foreign currency revaluation and consolidation block each other at period close in Dynamics 365 Finance, the fix is sequencing, not more threads. Run them in dependency order: settlement first, then revaluation of customers, vendors and the ledger, then consolidation once every source legal entity is final. Chain them as tasks in one batch job with constraints on the preceding task, give the close its own batch groups with a higher scheduling priority, keep competing jobs out with active periods, and start inventory close early in its own window after a recalculation. Read the blocking in SQL Insights and batch job history first, and rehearse the sequence before the next quarter end. Solzet designs and tunes this schedule.

Why do settlement, revaluation and consolidation block each other at period close?

Because they read and write the same data in large volumes, often at the same moment. Settlement changes open customer and vendor transactions. Foreign currency revaluation reads those open transactions and posts adjustments to the ledger. Consolidation reads ledger balances from every source legal entity and posts into the consolidation company. Inventory close adjusts inventory transactions and posts the adjustments to the ledger too. When two of them run together, one waits on locks the other holds, and the job that was meant to take an hour runs into the morning.

The collision is made worse by everything else that runs at night: integrations posting invoices, recurring imports, and reports reading the same tables. A schedule built from clock times (settlement at 22:00, revaluation at 23:00) works until one job runs long, and then every job after it overlaps. That is a sequencing problem first and a tuning problem second.

ProcessWhat it touchesWhy it collides
Customer and vendor settlementOpen customer and vendor transactions, for example CustTransOpen and VendTransOpen, and settlement recordsRevaluation reads the same open items; integrations posting payments write to them
Foreign currency revaluation (customers, vendors, ledger)Open transactions in foreign currency, ledger entries, voucher number sequencesWaits on settlement; competes with other ledger posting for the same accounts and sequences
Inventory close and recalculationInventory transactions and settlements, ledger adjustmentsLong running; posts to the ledger while revaluation and integrations post too
ConsolidationLedger balances of every source legal entity, the consolidation companyReads balances that are still moving if revaluation or late postings have not finished
Integrations, imports and reportsInvoices, payments, journals and the tables reports readHold locks or consume threads in the middle of the close sequence

In what order should the period-close batch jobs run?

In the order the data depends on, with each step starting only when the previous one has finished, not at a fixed time. The sequence below is the one we work to for a month-end or quarter-end close; adjust it with your controllers for entities without inventory or without foreign currency. Allocations and accruals sit between revaluation and consolidation, and how to move them out of manual journals is covered in month-end close with ledger allocation rules. The approvals and period lock that come after the jobs are covered in period close with enforced approvals.

StepJobStarts whenWhy this order
1Integration cut-off and posting of open journalsThe agreed cut-off time for each legal entityLate postings after this point move balances under the later jobs
2Inventory close for the period (after a recalculation earlier in the month)Cut-off is complete in entities with inventoryThe longest job; its ledger adjustments must be in before revaluation and consolidation read balances
3Customer and vendor settlementCut-off is completeRevaluation must see the final open amounts
4Foreign currency revaluation for customers and vendorsSettlement has endedRevalues only what is still open
5General ledger foreign currency revaluationSubledger revaluation has endedLedger accounts revalued after the subledgers, so nothing is revalued twice; check which main accounts are set up for revaluation
6Allocations and accrualsRevaluation has endedAllocate final balances
7ConsolidationEvery source legal entity has completed steps 1 to 6Reads final balances once, instead of rerunning after corrections

How do batch groups, batch servers and scheduling priority work now?

With priority-based batch scheduling, which Microsoft made required from version 10.0.38, batch groups are no longer tied to batch servers. A batch group sets the default scheduling priority for its jobs (Low, Normal, High, Critical or Reserved capacity), a single job can override it, and the scheduler picks tasks from all available batch servers. Two details matter for the close. First, priorities change the probability that a task is picked; they do not guarantee that one job runs before another, so priority is not a substitute for dependencies. Second, batch concurrency control lets you set Max concurrency on a batch group, which limits how many tasks of each job in that group run at once, so one heavy job cannot take every thread.

In practice that means a group for the inventory close and a group for the financial close, both at a higher priority than reports and exports, Reserved capacity only if a job truly needs dedicated threads, and the same thread count on every batch server. The details are in Microsoft Learn's priority-based batch scheduling. How the same groups and priorities protect warehouse scanning is on warehouse scanning slow during master planning, and groups that were never redesigned after an upgrade are covered in batch jobs slow after an AX 2012 upgrade.

How do you chain close jobs with dependencies and time windows instead of clock times?

A batch job can hold several tasks, and each task can carry constraints on the Constraints tab: the preceding task, the Expected status it must reach, and whether All or Any of the conditions must be met. Put settlement, revaluation and consolidation in one batch job as separate tasks, each constrained on the one before it with Expected status Ended, and the chain runs as fast as the data allows and never overlaps. A task can only be added by class name if the class supports it, and its parameters are set through Parameters on the task, so test each process in a sandbox before relying on the chain. Constraints work between tasks of the same job; where processes must stay in separate jobs, schedule them with a buffer and an alert on completion, and check Microsoft Learn for any newer options in your version.

Time windows do the rest. The Active period on a batch job limits when it may run, so recurring integrations and exports can be kept out of the close window without deleting their recurrence. Review every recurring job that runs every few minutes and ask whether it must run during the close at all. Set Maximum retries above zero on tasks that can safely rerun, because Microsoft recommends retryable, idempotent batch tasks so a transient SQL error does not stop the chain.

  • One batch job per legal entity or close stage, with tasks chained by constraints rather than start times.
  • Expected status Ended on the dependent task, so a failed step stops the chain instead of revaluing wrong balances.
  • Active periods on integrations, imports and heavy reports for the close window.
  • Max concurrency on groups whose jobs split into many tasks.
  • Alerts on job end and on error, sent to the person who owns the close.

Why does inventory close run past the nightly valuation deadline?

Inventory close settles issue transactions against receipts according to the valuation method on each item model group and posts the adjustments to the ledger; after it runs, nothing can be posted before the closing date unless the close is reversed, and only the last close can be reversed. Microsoft describes it as a required month-end step for every inventory model except moving average and recommends running it in off-peak hours, as set out in Inventory close. It runs long when a whole month of transactions waits for it, when receipts are not yet financially updated so issues cannot be settled, when it shares the window and the batch group with revaluation, settlement and integrations, and when custom X++ adds work to inventory posting.

The remedies are mostly scheduling. Run inventory recalculation during the month, which adjusts cost without settling, so the period-end close has less to do; measure whether it helps on your data rather than assume it. Start the close first in its own batch group, before the financial jobs, and keep integrations out with active periods. Clear the warnings the close log reports by updating receipts financially. And check what the nightly deadline actually needs: if it is a valuation report for the morning, an inventory value report may serve without running the close every night. If the close is still too slow after that, the cause is likely in data volume or code, which is the territory of batch jobs slow after an AX 2012 upgrade.

How do you read the blocking when close jobs collide?

Start in the application. Batch job history and the history of each batch task give start and end times, so you can lay the close jobs and everything else that ran on one timeline and see which ones overlapped. That alone often shows the cause: an integration that started mid-close, or revaluation that began before settlement finished.

Then look at the database. Lifecycle Services environment monitoring includes SQL Insights, with views of current blocking and of the queries and plans behind long waits, drawn from Query Store; Microsoft is moving monitoring to Monitoring and telemetry using Application Insights, so check the monitoring and diagnostics tools page for what is available for your environment today. Capture the blocking during the slow window, not the next morning. What you want is the head blocker: the session at the top of the chain, the statement it runs and the batch task it belongs to. If the head blocker is a close job waiting on another close job, the fix is sequencing. If it is a custom class, an integration or a report, the fix is to move it out of the window or to change its code.

  • The timeline of every batch job in the close window, from batch job history.
  • The head blocker, its statement and the batch task or user session it belongs to.
  • The waits behind the longest jobs, captured while they run.
  • The custom X++ involved, read in source control, if a custom class appears at the top of the chain.

What should you check before the next quarter end?

Use this checklist a few weeks before the quarter end, not the night before. Every step can be done without a code change, and the rehearsal is what tells you whether the sequence fits the window.

StepWhat it involves
1. List every job that runs in the close windowExport the batch jobs with their batch group, scheduling priority, recurrence, Run by user and recent runtimes from batch job history, including integrations, recurring imports and reports, not only the close jobs.
2. Write down the dependenciesAgree with finance that integrations stop posting first, settlement runs before revaluation, inventory close finishes before the ledger period is closed, and consolidation starts only when every source legal entity is final.
3. Give the close its own batch groups and prioritiesCreate batch groups for the inventory close and the financial close, set their scheduling priority above reports and exports, and set Max concurrency on groups whose heavy jobs should not take every thread.
4. Chain the jobs with batch task constraintsWhere the processes can run as tasks in one batch job, add them in order with a constraint on the preceding task and Expected status Ended; where they cannot, schedule separate jobs with a buffer and alerts on completion.
5. Clear the window of competing workSet active periods on recurring integrations and exports so they stay out of the close window, move heavy reports, and run inventory recalculation earlier in the month.
6. Rehearse on a copy of productionRefresh a sandbox from production, run the full sequence with real volumes, record the duration of each job and capture any blocking in the monitoring tools.
7. Run, monitor and review after the closeWatch batch job status and blocking during the real run, compare durations with the rehearsal, and fix the longest wait before the next quarter end.

What does Solzet do for period-close batch scheduling in Dynamics 365 Finance?

Solzet reads the close the way it actually runs: the batch jobs, groups, priorities and recurrences, the blocking during the close window and the custom X++ behind any job at the top of a blocking chain. We then design the close sequence with your controllers, set up the batch groups, priorities, Max concurrency and active periods, chain the close jobs with task constraints and alerts, plan the inventory recalculation rhythm, rehearse the full sequence on a copy of production, and stay with your team through the first close on the new schedule. Where the evidence points at code, our X++ developers fix it with regression tests. Our own senior consultants and developers do the work. The service line is Dynamics 365 Finance, and a wider review is our Dynamics 365 health check and technical audit.

For the CRM side, buyers who would rather not carry Microsoft licensing can choose a custom CRM. We recommend the right solution: Dynamics 365 (Customer Engagement, Business Central or Finance and Operations), Power Platform, or a custom-built CRM. One team for CRM, ERP and the integration between them.

What do people ask us?

In what order should settlement, foreign currency revaluation and consolidation run in Dynamics 365 Finance?

Settlement first, then foreign currency revaluation for customers and vendors, then general ledger revaluation, then allocations, and consolidation last, once every source legal entity has finished. Each step should start when the previous one ends, not at a fixed clock time.

Do batch priorities guarantee that one job runs before another?

No. With priority-based batch scheduling, priorities change the probability that a task is picked from the queue, not a strict order. Use batch task constraints within one batch job, or separate jobs with buffers and alerts, to enforce the sequence.

Are batch groups still tied to batch servers?

Not with priority-based batch scheduling, which Microsoft made required from version 10.0.38. Batch groups now set a default scheduling priority and, with batch concurrency control, a Max concurrency per job, and tasks run across the available batch servers.

Why does inventory close take so long in Dynamics 365?

Usually because a whole month of transactions waits for it, receipts are not financially updated, it shares the window and batch group with other close jobs and integrations, or custom code adds work. Run recalculation during the month, start the close first in its own group, and clear the warnings in the close log.

Does a nightly inventory valuation need inventory close every night?

Often not. Inventory close is normally a month-end step, and a morning valuation report may be served by an inventory value report without closing. Agree with finance what the nightly deadline really requires before scheduling the close more often.

How can we see which batch job is blocking another?

Lay batch job history on one timeline to see overlaps, then capture blocking during the slow window with SQL Insights in the environment monitoring tools, checking Microsoft Learn for what your environment offers today. Look for the head blocker and the batch task it belongs to.

Can Solzet redesign our period-close batch schedule?

Yes. Solzet reviews the batch jobs, groups, priorities and blocking, designs the close sequence with your controllers, sets up groups, constraints and active periods, rehearses on a copy of production and fixes custom X++ where the evidence points at code, with its own consultants and developers.

Which solution is right for your business?

Tell us what you need. A senior consultant replies within one business day with a recommendation (Customer Engagement, Business Central, Finance and Operations, Power Platform or a custom-built CRM), not a sales script.