Old Content Notifier Job
This script will check the pages and their descendants returned from the CQL clause provided to determine if there are any inactive pages.
If any inactive pages are found, a short report will be generated and emailed to all the users in the specified group.
An inactive page is defined as a page of a specified age where all descendants are also the same age or older. Adding a comment to a page will flag it as active.
The job will allow you to automatically notify content managers about inactive pages, for example:
- In a specified space, find all the inactive pages older than two years with inactive descendants without the label 'ignore_inactive'. The CQL clause would look like this: space = SPACEKEY and type = page and lastModified < now('-104w') and label not in (ignore_inactive)
This job will only operate on pages.
Follow these steps to set up the job:
Your job now appears on the Jobs page of ScriptRunner. It will run when specified in the script, and you can choose to run it at other times. You can also enable and disable it.