08-13-2021 05:01 PM
I've created a daily cron job that isn't quite working. I can see in the logs that it is running on the designated schedule. I am working in LTS 2021 testing in localhost. How do I start SchedulerServices? The warning in the Log: "WARN [Quartz_Worker-1] [org.nuxeo.runtime.model.impl.ComponentManagerImpl] The component exposing the service: interface org.nuxeo.ecm.core.scheduler.SchedulerService has failed to start".
09-01-2021 05:13 PM
We figured this out. We created an XML extension for the SchedulerService and for the event handler:
<extension target="org.nuxeo.ecm.core.scheduler.SchedulerService" point="schedule">
<schedule id="scheduledTrashMaintenance">
<event>scheduledTrashMaintenanceEvent</event>
<eventCategory>default</eventCategory>
<!-- every 10 minutes -->
<cronExpression>0 0/10 * ? * *</cronExpression>
</schedule>
</extension>
<extension target="org.nuxeo.ecm.core.operation.OperationServiceComponent" point="event-handlers">
<handler chainId="Trash_Maintenance">
<event>scheduledTrashMaintenanceEvent</event>
</handler>
</extension>
The event handler calls an automation chain that now runs based on the defined cron schedule. An issue that we had is that setting up the event handler in Studio defaulted to setting a filter on "regular document" instead of "any" so we just decided to add the handler in the extension instead for simplicity sake.
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.