Persistent Scheduler

Hi, I succeeded to add a scheduler using org.nuxeo.ecm.core.scheduler.SchedulerService but the added configuration are lost after nuxeo restarting. So i need to know how to dynamically configure the scheduler service and persist that configuration ? Thanks.

0 votes

2 answers

1137 views

ANSWER



Hi, finally I made the following tip:

  • Create a scheduler with the class SchedulerServiceImpl.java (this scheduler will be active when it is created and will be lost if NUXEO_SERVER restarts)
  • Save the scheduler in an xml file (extension point) in “nxserver/config” (this scheduler will be active the next time you start NUXEO_SERVER).
0 votes



In Nuxeo schedulers are defined by XML configuration, so what you're asking for is not possible without code changes.

0 votes



First of all, I want to thank you for your quick response. Second, what do you mean by "is not possible without code changes"? And finally, do you know what the "SchedulerService" class is for ? and what do you think about the following test class : https://github.com/nuxeo-archives/nuxeo-core/blob/master/nuxeo-core-event/src/test/java/org/nuxeo/ecm/core/scheduler/TestSchedulerService.java
11/06/2019

"Not possible without code changes" means that to implement this feature in the Nuxeo platform, you would have to write Java code (and non-trivial low-level code at that). TestSchedulerService is a unit test for the SchedulerServiceImpl service implementation class. This is the low-level code that would have to be changed to be able to persist (in some way to be defined) configurations added at runtime. Note that this persistence would need to be cluster-safe.
11/06/2019

OK thanks for the clarification. So if I understand correctly I have to see how to write a low-level code.
11/06/2019