Announcement Announcement Module
No announcement yet.
Problem while launching the spring batch with quartz Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem while launching the spring batch with quartz


    I am launching the spring batch through quartz scheduler.Here, i configured the scheduler to run every day.But , first time the quartz scheduler is launching the spring batch , and after sucessful completion, the quartz scheduler is terminating.

    Here I am not uisng the spring batch related quartz configuration.

    By using quartz i have written a scheduler and a job.

    In side the job I am calling

    CommandLineJobRunner.main(new String[] {"sample-config.xml" , "samplerJob"});

    Is there any issuse with configuration?


  • #2
    The problem is that SB can't determine the difference between executions of your Job. For more details on the difference between an instance and an execution, read here:

    However, this can easily be fixed by passing in an extra string parameter to the CommandLineJobRunner, which will be interpreted as a JobParameter. You can optionally use the JobOperator interface as well, which has some default mechanisms for how to handle an already Completed job.