AnsweredAssumed Answered

schedule an existant action

Question asked by mahdi on Dec 23, 2009
Latest reply on Dec 23, 2009 by mahdi
hi ,
i have developed an action with java and deployed into alfresco.but i need this action to be executed daily.
so i wrote this in scheduled-action-services-context.xml

   <beans>
   <bean id="TestTrigger" class="org.alfresco.util.CronTriggerBean">
<property name="jobDetail">
   <bean id="TestJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
   <property name="jobClass">
   <value>org.alfresco.synchroPeriodique.TestSchedule</value>
   </property>
   <property name="jobDataAsMap">
      <map>
         
      </map>
   </property>
   </bean>
</property>

<property name="scheduler">
<ref bean="schedulerFactory" />
</property>

<property name="cronExpression">
<value>* * 22 * * ?</value>
</property>
</bean>

</beans>



but it didn't work, here is the error

11:18:05,500  ERROR [quartz.core.ErrorLogger] An error occured instantiating job
to be executed. job= 'DEFAULT.TestJobDetail'
org.quartz.SchedulerException: Job instantiation failed [See nested exception: java.lang.IllegalArgumentException: Unable to execute job class [org.alfresco.synchroPeriodique.TestSchedule]: only [org.quartz.Job] and [java.lang.Runnable] supported.]
        at org.springframework.scheduling.quartz.AdaptableJobFactory.newJob(AdaptableJobFactory.java:41)
        at org.quartz.core.JobRunShell.initialize(JobRunShell.java:132)
        at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:358)
Caused by: java.lang.IllegalArgumentException: Unable to execute job class [org.alfresco.synchroPeriodique.TestSchedule]: only [org.quartz.Job] and [java.lang.Runnable] supported.
        at org.springframework.scheduling.quartz.AdaptableJobFactory.adaptJob(Ad
aptableJobFactory.java:74)
        at org.springframework.scheduling.quartz.AdaptableJobFactory.newJob(Adap
tableJobFactory.java:38)
        … 2 more

can you help me please?

Outcomes