cancel
Showing results for 
Search instead for 
Did you mean: 

Scheduled Job Runs 3 Times Instead Of 1 Time

shyam42
Champ on-the-rise
Champ on-the-rise

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 ACCEPTED ANSWER

shyam42
Champ on-the-rise
Champ on-the-rise

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 answer in original post

3 REPLIES 3

redraccoon
Star Contributor
Star Contributor

This guy had exactly the same problem 

scheduled job , queryTemplate 

kayne zhang's answers must help you

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

shyam42
Champ on-the-rise
Champ on-the-rise

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>