Housekeeping.
WHAT ACCUMULATES
Log files Temporary files Old backups Session data Orphaned uploads Soft-deleted records Old cache entries
WHAT THAT CAUSES EVENTUALLY
A full disk, which stops everything.
WHAT TO AUTOMATE
Log rotation and removal Temporary file cleanup Backup retention Session cleanup Removal of records past their retention period
WHAT TO BE CAREFUL WITH
Deleting anything by pattern Deleting by age without checking what is matched
WHAT TO DO FIRST
Run in reporting mode, and inspect the list.
WHAT TO LOG
Everything removed.
WHY
So an unintended deletion can be identified.
WHAT TO BOUND
How much a single run may delete.
WHAT TO MONITOR
Disk use trend, so cleanup failing becomes visible.
WHAT TO REVIEW
Whether the retention rules still match your obligations.