The Trashcan Cleaner is a scheduled job that periodically purges old content from your Content Services trashcan.
When content is deleted, the content store can be configured to move the deleted content into a trashcan. The deleted content can easily recovered from the trashcan, if it is deleted by mistake. The content remains in the trashcan until it is purged or cleaned by the Trashcan Cleaner. The Trashcan Cleaner is a scheduled job that will empty your Content Services trashcan.
The Trashcan Cleaner is disabled by default. To configure the Trashcan Cleaner, set the following properties in the alfresco-global.properties file:
Property | Description |
---|---|
trashcan-cleaner.cron | Specifies the cron schedule for the Trashcan Cleaner job. See Scheduled Jobs. For example, 0 30 * * * ?. |
trashcan-cleaner.keepPeriod | Specifies the period for which trashcan items are kept (in the java.time.Duration format). For example, P1D. |
trashcan-cleaner.deleteBatchCount | Specifies the number of trashcan items to delete per job run. For example, 1000. |
For example, to configure the scheduled process to clean all the deleted items older than one day to a maximum of 1000 (each execution) each hour at the middle of the hour (30 minutes), add the following properties in the alfresco-global.properties file:
trashcan-cleaner.cron=0 30 * * * ? trashcan-cleaner.keepPeriod=P1D trashcan-cleaner.deleteBatchCount=1000
To enable debug logging, set the logger.alfresco-trashcan.name and logger.alfresco-trashcan.level properties in the log4j2.properties file:
logger.alfresco-trashcan.name=org.alfresco.trashcan logger.alfresco-trashcan.level=debug
The trashcan cleaner is a Simple Module which appears in the Admin Console under the Module Packages section.http://localhost:8080/alfresco/s/enterprise/admin/admin-systemsummary
To disable the Trashcan Cleaner, add the following to the alfresco-global.properties file: trashcan-cleaner.cron=* * * * * ? 2099