cancel
Showing results for 
Search instead for 
Did you mean: 

Nuxeo LTS 2023 and SchedulerService

Sudarshan_Ghate
Confirmed Champ
Confirmed Champ

Hello,

In LTS 2023, I am trying to fire an event every 5 minutes in Nuxeo. I have the following in the OSGI-INF directory.

<?xml version="1.0"?>
<component name="com.ins2.rgp.schedulers">
<extension target="org.nuxeo.ecm.core.scheduler.SchedulerService" point="schedule">
<schedule id="workdaysyncevent" enabled="true">
<eventId>workdaysyncevent</eventId>
<eventCategory>default</eventCategory>
<cronExpression>0 0/5 * ? * *</cronExpression>
</schedule>
</extension>
</component>


In the MANIFEST.MF file I have the following entry

OSGI-INF/workdaysync-scheduler.xml


But the event does not seem to get fired at all.  What else am I missing?  How can I troubleshoot this?

Thanks,

SG

3 REPLIES 3

Josh-F-Hyland
Employee
Employee

It's unclear to me if you're trying to build a Nuxeo Package or just trying to deploy loose files. If it's the former, check out the doc link and also take a look at Nuxeo CLI. If it's the latter I think you're going to struggle. There are a few things that I have seen that can be managed via loose files but this is really just a bad habit that's better to eliminate ASAP. It's not sustainable.

Ideally, for something this simple, you should just add the Scheduler contribution in Nuxeo Studio. Note that you can define the event in Studio as well using the Registry.

--
Hyland Sales Solution Engineer

Sudarshan_Ghate
Confirmed Champ
Confirmed Champ

Thank you.  I am using the Nuxeo CLI to build the Nuxeo package.  I have bootstrapped the Event listener was trying to trigger the event using XML Extension in Nuxeo Studio to test some piece of code every 5 minutes but that did not work.  I was using following instructions

https://doc.nuxeo.com/studio/scheduling-periodic-events/

I noticed that this is using the org.nuxeo.ecm.core.scheduler.SchedulerService whereas the example you gave is using org.nuxeo.ecm.core.scheduler.ScheduleRegistryService.  What is the distinction between the two?

I ended up moving the contribution to the code repo.  I think in my XML I am using 

<eventId>workdaysyncevent</eventId>
<eventCategory>default</eventCategory> it does not work but the following seems to work?

<event>workdaysyncevent</event>
 
I appreciate the feedback !
 
 

 

 

 

Escalation is a Workflow feature so not related to what you want to do.

It would be interesting to know if your event is being fired it's just that the event handler isn't called. I don't know of a great way to check that though other than debugging 😞 You could try creating an Event Handler in Studio. There's a small chance that Nuxeo CLI didn't generate valid code/config.

I have always used eventId but I see examples of both in the existing contribs. I'm not sure of the difference but it would appear both should work.

--
Hyland Sales Solution Engineer
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.