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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Batch (writing to Excel file) doesn't run

(0) ShareShare
ReportReport
Posted on by 665

Hi,

We have created a excel file using ax 2009 batch job. Once job is executed the excel file is expected to save in given folder. My batch is not ending and it will still executing and its status shows as "Ready". I have to do basic > periodic > batch > processing to "end" the batch. Then the excel file will be saved to the given path.

My question is, Is there any way of doing the processing task, from my batch job itself, rather than processing manually?

 

 

AX Version : Dynamics AX 2009 SP1 RU7

*This post is locked for comments

I have the same question (0)
  • Iulian Cordobin Profile Picture
    8,201 on at

    Are you closing excel in the code, after doing the writing? Maybe that is what keeps the batch job not ending? Also, if you do not end it manually, how long does it stay in the processing state?

  • Martin Dráb Profile Picture
    237,994 Most Valuable Professional on at

    First of all, please confirm the status of the batch. You said it's executing, but also that it's status is "Ready", which means that the execution didn't even start.

    If the batch didn't start, you have a problem with the setup of your batch server, batch group, schedule or something like that.

    If it's executing, something is wrong inside the batch. Aren't you using client-bound classesv there, such as SysExcel? Batches have no client, so they can't execute such code.

  • Prabath Profile Picture
    665 on at

    Hi All,

    Thanks for your reply.

    1. Excel file is not opening by code. It's saved to a given path

    2. Batch job configuration is working properly

    3. Yes, I used Sysexcel classes

    3. When I Run the job,

     It will start "Executing", but the status of Batch tasks screen is "Ready".

    Batch-2.jpg

    After run Basic > Periodic > Batch > Processing (Manually) , the batch will be "END", and excel file will be saved.

     

    Batch-2.jpg

     

    My Concern is, Is there anyway of avoiding Basic > Periodic>Batch >Processing? Cant we save file directly to the folder without user involvement?

     

    Thanks

    Prabath

  • Suggested answer
    Martin Dráb Profile Picture
    237,994 Most Valuable Professional on at

    Aha, it seems you have a client batch, in the same way as it used to work before batch server functionality was introduced. These client batches can't run on batch server, because (as I explained) there is no client to execute client-bound code. Therefore you have to do the processing through a client, which is what Basic > Periodic>Batch >Processing is used for. If you want to automate it, you must call it through a scheduled task in Windows (with a startup command to instruct AX to run the client batch processing on startup). Alternatively you would have to redesign your class and get rid of all client-bound code.

  • Prabath Profile Picture
    665 on at

    Hi martin,

    Thanks for the suggestion.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans