10-12-2017 06:28 AM
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
10-12-2017 04:31 PM
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.
09-16-2021 12:14 PM
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>
09-20-2021 12:28 PM
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>
10-13-2017 03:53 AM
Thanks Axel, I'll give that a go
Paul
Explore our Alfresco products with the links below. Use labels to filter content by product module.