Hi All,
Does anyone out there know how to get a custom scheduled job to appear on the Admin Console?
I've followed the instructions in the documentation (Scheduled Jobs | Alfresco Documentation ) to implement my new job and its all working as expected.
I was hoping that it would just appear on the admin console with all the other jobs (i.e. http://server:8080/alfresco/s/enterprise/admin/admin-scheduledjobs) but apparently this is not the case.
Any ideas?
Thanks
Paul
You need to register the job similarly to the default jobs, with the default scheduler factory bean ("schedulerFactory") of Alfresco instead of a custom one (which I see people in the community do from time to time). I'm a bit surprised about the documentation though, since that deviates from what I have been doing all these years and which was working fine. You can take a look at one of my projects for an example.
Thanks Axel, I'll give that a go
Paul
I saw your code, but I didn't understand where should I exactly define in the bean definition ?
this is my code :
<bean id="bean.com.Job.actions.ScheduledJobExecuter" class="com.Job.actions.ScheduledJobExecuter"> <property name="serviceRegistry" ref="ServiceRegistry" /> <property name="nodeService" ref="NodeService" /> <property name="searchService" ref="SearchService" /> </bean> <bean id="xxxSchedulerAccessorJob" class="org.springframework.scheduling.quartz.SchedulerAccessorBean"> <property name="scheduler" ref="schedulerFactory" /> <property name="triggers"> <list> <ref bean="xxxJobScheduledACSTrigger" /> </list> </property> </bean> <bean id="xxxJobScheduledACSTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean"> <property name="cronExpression" value="${xxx.scheduledjob.cronexpression}" /> <property name="startDelay" value="${xxx.scheduledjob.cronstartdelay}" /> <property name="jobDetail"> <bean class="org.springframework.scheduling.quartz.JobDetailFactoryBean"> <property name="jobClass" value="com.Job.scheduledjob.jobs.ScheduledJob" /> <property name="jobDataAsMap"> <map> <entry key="dataScheduledJobExecuter" value-ref="bean.com.Job.actions.ScheduledJobExecuter" /> <entry key="jobLockService" value-ref="jobLockService" /> </map> </property> </bean> </property> </bean>
I saw your code, but I didn't understand where should I exactly define in the bean definition ?
this is my code :
<bean id="bean.com.Job.actions.ScheduledJobExecuter" class="com.Job.actions.ScheduledJobExecuter"> <property name="serviceRegistry" ref="ServiceRegistry" /> <property name="nodeService" ref="NodeService" /> <property name="searchService" ref="SearchService" /> </bean> <bean id="xxxSchedulerAccessorJob" class="org.springframework.scheduling.quartz.SchedulerAccessorBean"> <property name="scheduler" ref="schedulerFactory" /> <property name="triggers"> <list> <ref bean="xxxJobScheduledACSTrigger" /> </list> </property> </bean> <bean id="xxxJobScheduledACSTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean"> <property name="cronExpression" value="${xxx.scheduledjob.cronexpression}" /> <property name="startDelay" value="${xxx.scheduledjob.cronstartdelay}" /> <property name="jobDetail"> <bean class="org.springframework.scheduling.quartz.JobDetailFactoryBean"> <property name="jobClass" value="com.Job.scheduledjob.jobs.ScheduledJob" /> <property name="jobDataAsMap"> <map> <entry key="dataScheduledJobExecuter" value-ref="bean.com.Job.actions.ScheduledJobExecuter" /> <entry key="jobLockService" value-ref="jobLockService" /> </map> </property> </bean> </property> </bean>
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.