There's no error : when you check out org.nuxeo.ecm.platform.scheduler.core you also have to check out org.nuxeo.ecm.platform.api. At least in the case you are using the branch nxp-5.0.0 (which is my case), I dont know if it is checked out automatically when you are using the trunk ...

Vincent Dutat wrote:
Thanks for the info and the hard work.
I got an error when maven compiles. I see that the component has a dependency in artifact NXPlatformAPI. Does this artifact still exist ? Or maybe it was renamed ...

Florent Guillaume wrote:
There is a new component in the ECM platform: a scheduler that can trigger core events at designated times.

The times specification is the same as the one used by the Unix cron program, and therefore quite flexible, see
http://quartz.sourceforge.net/javadoc/org/quartz/CronTrigger.html

The component is named org.nuxeo.ecm.platform.scheduler.core and lives at
http://svn.nuxeo.org/nuxeo/org.nuxeo.ecm.platform.scheduler/trunk/core

A unit test shows how to do the configuration (see test/resources/test-nxscheduler.xml), basically you have to use an extension point and say for instance:
   <schedule id="testing">
      <username>Administrator</username>
      <password>Administrator</password>
      <eventId>testEvent</eventId>
      <eventCategory>default</eventCategory>
      <!-- every second -->
      <cronExpression>*/1 * * * * ?</cronExpression>
  </schedule>

There is also a core listener example that shows how to reconnect to a CoreSession and from there get the document root. This is possible because the scheduler recreates a UserSession before sending the regular core event. This depends on a trunk version of org.nuxeo.ecm.core.repository (to get a proper service registration of the CoreSession).

Florent

--Florent Guillaume, Director of R&D, Nuxeo
Open Source Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87

_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to