how to configure Batch job Execution in dynamics ax

Dear Friends,

How can we configure batch job in dynamics ax 2009.

my problem is that i have integrated dynamics ax with some other s/w using excel file, now i have to read daily this excel file from a particular location to my system using executable class, so i want a batch job which execute my class daily on a fix time…!!

Please help.

Rgds

BK

You can run this job to add batch processing for your class:

// Read excel from batch processing - By Vishal

static void BatchJobSchedule_ExcelImport(Args _args)

{

BatchHeader batHeader;

BatchInfo batInfo;

RunBaseBatch rbbTask;

str sParmCaption = “ExcelReading”;

;

rbbTask = new ExcelImport(); // Your class name which contains the logic to import from excel.

batInfo = rbbTask .batchInfo();

batInfo .parmCaption(sParmCaption);

batInfo .parmGroupId(""); // The “Empty batch group”.

batHeader = BatchHeader ::construct();

batHeader .addTask(rbbTask);

batHeader .save();

info(strFmt("’%1’ batch has been scheduled.", sParmCaption));

}

Thanks vishalji for prompt resposnse,

everything is ok for batch processing but issue is that i have to read an excel file using server side batch job

which is not possible as i have searched on the web, microsoft not provide a way to use sysexcel class at server side.

if this is right than i m thinking to use dotnet methods in Ax to read excel file so that my batch can run on server side without consuming a client license …!!

pls help or suggest

Rgds

BK