Housekeeping¶
CiviCRM creates log files, temporary files and database rows that nothing ever removes. Rotated log files pile up in the log directory, civicrm_system_log records every incoming payment notification forever, and the mailing event tables grow without bound. This extension purges them on a schedule.
It provides:
- A daily Housekeeping scheduled job that runs a set of independent tasks, each with its own retention.
- An admin screen at Administer > System Settings > Housekeeping Tasks to enable or disable each task, set how long it keeps things for, and see what it removed last time.
- Status checks for a task that has silently stopped running, for the core cleanup job being enabled alongside this one, and for another extension's scheduled job purging the same thing as one of these tasks.
It replaces the core Clean-up Temporary Data and Files job (Job.cleanup): every option of that job is available here as a task, so the core job is disabled automatically once this one has run, and restored if this extension is disabled.
Tasks that destroy data someone may still want - the contact change log, mailing statistics, the detailed logging audit trail and trashed contacts - are off by default.
See Tasks for what each task does and how to configure it.
Groundwork for core¶
getType(), getPolicy() and getRetention() on each task mirror the fields proposed for a core "HouseKeeping" entity in dev/core#5347, so these can become managed entity records if that lands.
Support and Maintenance¶
This extension is supported and maintained with the help and support of the CiviCRM community by MJW.
We offer paid support and development as well as a troubleshooting/investigation service.