batch Processor

Hi.
I need import many xml files every time
I have a method that I read these files and import to my solution.
I need create a batch processor on server for that. I have this method:

function importar_xml()
{
var startDate = new Date();
startDate.setTime(startDate.getTime()+20000);
var endDate = new Date(startDate.getTime()+100000);
plugins.scheduler.addJob(‘importar’, startDate, globals.importar_xml(), 20000, 40, endDate,‘mybatch’ )

On the server batch processor I put mybatch in arguments but this job never runs.
What I doing wrong?
Thanks

Hi Juan,

Did you set the onStart property of the module to you importar_xml() method ?
The arguments property in the admin page will send this value as an argument to the onStart method.

Hope this helps.

globals.importar_xml()
```Take away the brackets '()' and you are fine.
When you enter it the method is not added to your scheduler but evaluated.