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 :
Microsoft Dynamics AX (Archived)

Batch Job Works Incorrectly

(0) ShareShare
ReportReport
Posted on by 363

Hello experts,

I'd like to get any help from you.

I'm using AX2012(default version), not R2 or R3.

The kernel version of AX is 6.0.1108.3459 and application version is 6.0.1108.670.

My problem is batch job which doesn't work correctly.

The batch is working every single 2 minutes, and batch job history shows all "Ended" without any error log.

The main purpose of the batch is to change status "S" when the batch works correctly and when it has error it will change into "E".

After end of the batch job, the status is changed into "E", even though the batch job history doesn't show any error or problem.

So I tried to debug the class so that I check if some of its code have problem, but it doesn't have problem.

Moreover, the very thing that made me wondered was if I run the class manually(not by batch job), it worked correctly and it return the status "S"(which means it succeeded).

Consequently, What I want to ask is why the class works in wrong way when it run by batch and it works correctly when it run by manually.

How can I approach to solve this issue, please give me any idea about it.

Thanks.

*This post is locked for comments

I have the same question (0)
  • Lifeisbelieveful Profile Picture
    363 on at
    RE: Batch Job Works Incorrectly

    Thanks for your all kind reply.

    I checked some data were stuck in the process, so I restarted AOS and generated CIL.

    after that I deleted the class and made it again.

    Besides, I made the interval of batch schedule bigger.

    Finally the batch runs correctly.

  • Verified answer
    nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: Batch Job Works Incorrectly

    Like Andre suggested, make sure you have generated CIL after latest x++ changes. Only the CIL generation regenerates the DLL file which is used by the batches.

    If you run it in user session instead of batch, it runs (not in all scenarios) the x++ code, not DLL.

    So this can explain the difference.

    In a multi AOS system, all AOS must be restarted after CIL generation (and during CIL generation or any code import/change only one AOS should be running). Each AOS reads the DLL / CIL from modelstore during startup.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    298,959 Super User 2025 Season 2 on at
    RE: Batch Job Works Incorrectly

    Hi Daniel,

    It is not clear what exactly you have done here. I do assume it is about a custom class which needs to update a certain field based on a condition. It is working correctly when you run it manually, then probably the CIL needs to be recreated on the batch AOS server.

    If this does not help, you have to provide some more details.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans