Scheduled actions
Now you know how to define and execute actions manually. You can also execute these actions automatically, at a specified time. This will be helpful in use cases such as checking documents' statuses periodically, or for generating reports or executing business rules and notifying certain users.
Alfresco supports Scheduled actions so that you can configure certain actions to run at a certain time, automatically. A scheduled action is made up of three parts:
A cron expression,
A
query
template, andAn
action
template.
At the times specified by the cron expression, the query template will generate a query to select a set of nodes (Spaces and Documents). For each of these nodes, the action template applies the action.
The query may be similar to:
A document has aspect
It was created in the last month
It is due in the next month
It is in a category
Example of archiving expired content
Refer to the sample custom JavaScript (chapter6_archive_expired_content.js
) you created earlier, which...