Old Content Notifier

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 were 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.

This scheduled job will allow you to automatically notify content managers about inactive pages, for example:

  • On a specified space, find all the inactive pages older than 2 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)

Use the Content Age field to determine what items will be deleted. The Preset Filters are:

  • Older than 6 months

  • Older than 1 year

  • Older than 2 years

    You also have the option to select a Custom Filter, Older Than. If you select the Older Than value, a screen appears where you choose inputs.

Usage

Start by writing CQL to select the pages you are interested in. See the provided examples on the CQL field in the script to select only pages from particular spaces etc.

The job could potentially take a while to complete if casting a large net with your CQL clause.

This job will only operate on pages.

The "Older than weeks" field must contain a value (which specifies a specific date) equal or greater than the date specified in the CQL 'lastModified' clause.

The following image shows an old content notifier job which will run as the Admin user each Sunday morning just after midnight. The CQL clause will find all pages in space with space key 'AN' which were last modified over 2 years ago.

On this page