cancel
Showing results for 
Search instead for 
Did you mean: 

How to schedule an automation-chain

Nuxeo_User
Confirmed Champ
Confirmed Champ

Hi 🙂 I want to schedule an automation chain . I have created the operation which deletes the trash .Then i used the following extension to set up a scheduler to be executed every 1 minute but nothing happens.This is the extension:

DeleteTrash 0 1 0 * * ?
7 REPLIES 7

pibou_Bouvret
Elite Collaborator
Elite Collaborator

You need to setup an event handler that will catch the event you created (DeleteTrash) and call your automation chain (DeleteTrashOperation)

<extension target="org.nuxeo.ecm.core.operation.OperationServiceComponent" point="event-handlers">
<handler chainId="DeleteTrashOperation" postCommit="true">
  <event>DeleteTrash</event>
</handler>
...

I dont understand this

Now it recognises the Scheduler..It turned out that the problem was Cron Expression..But now i have another problem.It throws an exception saying

Can you show us your custom operation DeleteTrashOperation ?

@Operation(id = DeleteTrash.ID, category = Constants.CAT_DOCUMENT, label = "DeleteTrash", description = "")

I test it with a user Action so the code is fine..i dont understand why it doesnt work with the scheduler

Not sure if OP's problem was solved. If not, the reason why it wasn't working was because CoreSession is not injected when using Schedulers as mentioned in here

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.