Scheduled Job Runs 3 Times Instead Of 1 Time

cancel
Showing results for 
Search instead for 
Did you mean: 
shyam42
Active Member

Scheduled Job Runs 3 Times Instead Of 1 Time

Jump to solution

Hi,

I am trying to schedule a job in Alfresco so for that, I have read this. I have got all idea how things work but this runs my java class 3 times instead of 1 time. How can I fix this?
I have also tried this but did not work.

All the files are attached.

1 Solution

Accepted Solutions
shyam42
Active Member

Re: Scheduled Job Runs 3 Times Instead Of 1 Time

Jump to solution

I find the solution.

<bean id="customJobTrigger" class="org.alfresco.util.CronTriggerBean">
  <property name="jobDetail">
   <ref bean="customJobDetail" />
  </property>
  <property name="scheduler">
   <ref bean="schedulerFactory" />
  </property>
  <property name="cronExpression">
   <value>cronExpression</value>
  </property>
</bean>

<bean id="customJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
  <property name="jobClass">
   <value>CustomJobProcessor
   </value>
  </property>
</bean>

View solution in original post

3 Replies
redraccoon
Established Member

Re: Scheduled Job Runs 3 Times Instead Of 1 Time

Jump to solution

This guy had exactly the same problem 

scheduled job , queryTemplate 

kayne zhang's answers must help you

shyam42
Active Member

Re: Scheduled Job Runs 3 Times Instead Of 1 Time

Jump to solution

Yes, I also tried that but does not work...

shyam42
Active Member

Re: Scheduled Job Runs 3 Times Instead Of 1 Time

Jump to solution

I find the solution.

<bean id="customJobTrigger" class="org.alfresco.util.CronTriggerBean">
  <property name="jobDetail">
   <ref bean="customJobDetail" />
  </property>
  <property name="scheduler">
   <ref bean="schedulerFactory" />
  </property>
  <property name="cronExpression">
   <value>cronExpression</value>
  </property>
</bean>

<bean id="customJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
  <property name="jobClass">
   <value>CustomJobProcessor
   </value>
  </property>
</bean>

View solution in original post