Announcement Announcement Module
Collapse
No announcement yet.
Why a job with Quartz should run more than once? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why a job with Quartz should run more than once?

    Hi,

    I've a problem with a scheduled batch. A job gets triggered on a scheduled time however, there are multiple WORKER threads instantiated by org.springframework.scheduling.quartz.SchedulerFac toryBean.

    Of course the job is not restartable and hence if the first JOB EXECUTION INSTANCE is COMPLETED then all other attempts are logged as exception in the log file?

    Any idea why there are so many worker threads instantiated??? [There are at least 20 threads trying to do the same job]

    Code:
    2011-04-15 16:10:00,028 [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1] INFO  org.frb.ptcp.batch.quartz.JobLauncherDetails - Quartz trigger firing with Spring Batch jobName=loadDataFeed
    2011-04-15 16:10:00,575 [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1] INFO  org.springframework.batch.core.launch.support.SimpleJobLauncher - Job: [FlowJob: [name=loadDataFeed]] launched with the following parameters: [{}]
    2011-04-15 16:10:00,653 [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1] INFO  org.springframework.batch.core.job.SimpleStepHandler - Executing step: [loadRules]
    2011-04-15 16:10:00,887 [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1] INFO  org.springframework.batch.core.launch.support.SimpleJobLauncher - Job: [FlowJob: [name=loadDataFeed]] completed with the following parameters: [{}] and the following status: [COMPLETED]
    2011-04-15 16:10:01,012 [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-2] INFO  org.frb.ptcp.batch.quartz.JobLauncherDetails - Quartz trigger firing with Spring Batch jobName=loadDataFeed
    2011-04-15 16:10:01,106 [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-2] ERROR org.frb.ptcp.batch.quartz.JobLauncherDetails - Could not execute job.
    org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException: A job instance already exists and is complete for parameters={}.  If you want to run this job again, change the parameters.
    	at org.springframework.batch.core.repository.support.SimpleJobRepository.createJobExecution(SimpleJobRepository.java:122)
Working...
X