cancel
Showing results for 
Search instead for 
Did you mean: 

How do I start SchedulerServices

Travis_Sandstr1
Champ on-the-rise
Champ on-the-rise

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".

1 REPLY 1

Phil_Ludlow
Star Contributor
Star Contributor

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.

Getting started

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.