Batch processing in Dynamics AX

This question I get from most customers that I work with, “What does batch mean?”. Each time we go through a lot of defining what it means and how to setup an environment to manage the batch processes. So I’m writing this more for the systems administrators so that they can work with their functional application teams during an implementation to plan how they are going to use batch.

Firstly batch will mean something different if you are coming from a legacy accounting or ERP application where the modules are not built as an integrated suit. In this context it usually means that a sub-ledger or sub-module posts data to the general ledger or some other module.

In Dynamics AX “batch” is a server infrastructure feature that allows processing to be offloaded to a dedicated server process. This can be used to better manage the performance in your Dynamics AX environment by running tasks at a schedule like overnight, or at a regular schedule the user sets, or during the day to a different machine.

There are a lot of application processes that are written that can be off loaded to batch. This can be from reports, long running processes like an invoice post/print, planning activities like master planning. Or they can be system tasks like workflow processing etc. All have to be planned and managed so that A. Users understand what is happening and B. The infrastructure team have some capacity planning, monitoring in place so that they can support A.

When application functionality is written it needs to be written supporting the batch framework as it’s now called the SysOperations Framework. . Prior to AX2012 this was called the RunBase framework. While a lot of the concepts rename the same from a management point of view if you are developing prior to AX2012 be aware of the differences in the frameworks. As well for development background reading have a look at the Microsoft Dynamics AX 2012 White Paper: Introduction to the System Operation Framework. What’s all I’ll cover in this post on development as I want to focus on the administration part.

How does the user interact with the batch? Well then need to be educated firstly otherwise everything that the users do in Dynamics AX will be interactive. If a piece of application functionality is written to support the batch framework then they will see a batch button or a batch tab on a form. Here is an example:

This is the dialog when a user runs the Customer aging snapshot in Accounts Receivable. This is a process that updates the debtors aging, e.g. 30,60, 90 etc. Without the aging being run the current debt’s alignment to the aging buckets won’t be done and so if it’s left too long then when the collections team are doing their job then might ignore a customer how has now gone from 60 into the 90 days bucket and should focus on them rather than some other customers who are more current. If the AR teams is small then someone might have the job of running this. Now this isn’t particularly a heavy process but it’s just work that needs to be done. So either they could run it each Wednesday or what every interval it is when they do collections or they could set their parameters and submit to a batch at a recurring schedule so it’s one less thing they have to worry about. Or they could submit it to batch and just have it run every morning for example before the collection team gets into work. These are some of the decisions the functional teams will analyze during implementation but the infrastructure team needs to be aware of how much is expected to run in batch so they have planned enough infrastructure.


The recurrence on the batch is flexible in terms of typical patterns of when you want to repeat something. The smallest interval is 1 minute. There isn’t any controls on the recurrence to this would have to be up to the education process on explaining to the users on how to use this.


Now this might be a first thing that you might want to control is the smallest recurrence there isn’t a standard way to control the values so that would require a little work. So see this post

for details on this.

The batch group is how the user can allocate which “queue” they want to submit to. How does the user know what batch group to select ? That can only be done by education so you need to manage this education with the infrastructure you setup.

You can administer the batch groups under the server configuration.

Go into the /System administration/Area page/Setup/Batch group


Here you can add different groups. In this screen there are just three groups from the basic demo data. After you have done you load analysis with the functional team you can work out what sort of batch groups and how you want to allocate them across AOS servers to spread the load.


If you click on the Batch servers tab on this form you will which server will process that batch group. If a batch group isn’t assigned to a server then it’s not going to process so a user isn’t going to know that. Something you need to keep in mind on the education process. If you have setup a batch group and not told users about it good chance someone will submit something to it. You will have to do some investigation of the batch jobs and history to see what jobs are sitting there waiting and which group they are assigned to.


You can further control the batches in the Server configuration. Go into the /System administration/Area page/Setup/System/Server configuration


There are 3 main things you want look at. Is the AOS enabled for batch, what is the batch server schedule and what groups are assigned to be processed.


Enabling the AOS for batch is something that you don’t want to do for all AOS servers. Some AOS’s will be used for just user processing. In a very small environment you might only have one AOS in which case it might be enabled but usually even in a small environment install a second AOS and use it for batch process to isolate the AOS being used for user activity and background processing in batch.

The batch server schedule is something you want to use to control when processing is done. For example you might want to setup batch processing to only happen outside normal hours when the bulk of users are not on the systems. This way can protect load from the database during the day. This might not always work for users because there are some tasks that will need to be run in batch but during the day. So this is a balance you need to work out with the functional team.

The batch group is what is assigned to be processed by this AOS. With the combination of the batch group and the server schedule you can mix and match how you manage batch processing over the course of the day.

This post is getting long enough so I’ll continue in a later post.



4 responses to “Batch processing in Dynamics AX

  1. Dear LachLan,

    Thanks for your sharing, it’s helpful.
    However, what if I want to run the Customer Aging batch job with the parameter for “AS ON” date is the today. I would like to run this report every morning.

    Thank you & Best Regards,
    Anh Mai


  2. Hi Lachlan,

    Nice article.
    We have a need to run workflow and AIF during the working day. So far we have not seen a need for these recurring batch jobs to run overnight. Nightly our Commvault backup jobs back up the AOSs and occassionally this causes the batch jobs to get stuck in Executing or Withhold. How could we set up batch jobs and batch groups so that they don’t run during the backup window, say 10-11pm?


      • What do you mean by “batch server schedule”?
        If you mean the individual batch job schedules then I can’t see how to set them to run 24/7 but with an exception window where they don’t run.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s