03-04-2018 10:52 AM
Hello,
It is currently not possible to customize the Quartz job and trigger created by the SchedulerService
, like adding @DisallowConcurrentExecution
to the job or changing the misfire behavior.
This PR adds an optional jobFactoryClass
attribute on the schedule
extension point of SchedulerService
allowing to customize the job and the trigger, falling back to the previous behavior if not specified.
For example :
<schedule id="testSchedulerSingleExecution"
jobFactoryClass="org.nuxeo.ecm.core.scheduler.SingleExecutionEventJobFactory">
<event>testSchedulerSingleExecution</event>
<cronExpression>* * * * * ?</cronExpression>
</schedule>
public class SingleExecutionEventJobFactory extends DefaultEventJobFactory {
@Override
protected Class<? extends EventJob> getJobClass() {
return SingleExecutionEventJob.class;
}
}
@DisallowConcurrentExecution
public class SingleExecutionEventJob extends EventJob {
}
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.