web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Batch Job Operation Flow?

(0) ShareShare
ReportReport
Posted on by 25

HI Guys,

I found a lot of question threads about batch job, but not much talk about the architecture of batch job operation. 

There's a interesting thread i think you guys is curious the same things like me, please take a look on it, that is great discussion, Execute batch jobs with a third party tool.

For my understanding, batch job is generated via Business Operation Framework (Or something else?), then it would queuing on the batch schedule and waiting batch server to handle it and that's all.

That what i understanding, but after that, how the things work on server side is like a black-hole. For some question that i am curious is.

  1. Is that server execute a batch job from X++ code? or there have some system classes the use of?
  2. Where is the trigger point (Programming aspect), that server start execute a batch job?, Simply which class? or which services?
    1. In details, i want a how batch server call a classes to search out the pending batch job?
    2. The classes for execute batch task in generically
    3. After task complete, which classes for updating the schedule.

The above two question is the starting point of the batch job explore journey. Is there any experienced adventurer share some insight to me?

Like any system library? architecture diagram? or personal finding?

I have the same question (0)
  • Martin Dráb Profile Picture
    235,959 Most Valuable Professional on at
    RE: Batch Job Operation Flow?

    Sorry, I don't work with AX 2012 anymore, I was looking into D365FO. While method names may differ, the logic is still almost the same and BatchRun class is the right one.

    The fact that this class is also used from places that you're not interested in (startup commands, client batches) doesn't mean that it's not used in the process we're talking about. It's executed automatically by AX kernel on AOS designated as batch servers. As I mentioned before, you can use the debugger to see that the class indeed does the job.

  • 51M0N Profile Picture
    25 on at
    RE: Batch Job Operation Flow?

    Unfortunately , my version (AX2012 R3, Kernel 6.3.5000.138, Application 6.3.4000.123) doesn't contains the methods that you mentions, but contains some other like.

    BatchRun::runJobStaticWrapper, BatchRun::runJobStatic & BatchRun::runJobStaticCode, but anyway i guess they are do same job as your method.

    After a quick investigation, the above three methods are call from class "SysStartupCmdBatchRun" which is extended from "SysStartupCmd", that i can found.

    But i found a question thread that you are involved a couple years ago startup job when AOS service starts, clearly you are mentioned, the "SysStartupCmd" was not the case for implement customized functions on Server Startup, it just for client only, and i also had some modification on it and i completely agree your point.

    So that's the question how the batch job execution process (Or services?) begin triggered during AOS server is starting up or after started?. OK, let we assume the server would call that class by magic, but class "BatchRun/main" function is already contains client execution mode keyword, for my understanding, server should not execute that code on server-side and i correct? If yes, We back to the original, which class calling the "BatchRun"(Or some other classes) for a batch job service? or there are any other class are doing similar function as "BatchRun" on server side?

  • Verified answer
    Martin Dráb Profile Picture
    235,959 Most Valuable Professional on at
    RE: Batch Job Operation Flow?

    The logic is all in X++, therefore you can easily review it (and event debug it when needed).

    Most of the work is done by BatchRun class, based on data from Batch* tables. For instance, look at BatchRun::runJobStaticCodeFromBuffer().

    By the way, the Business Operation Framework is just one of the options. The other is the older framework, RunBaseBatch. But both share the same infrastructure for scheduled batches.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 756 User Group Leader

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 629 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 514 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans