mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-09-25 01:53:03 +02:00
9 lines
563 B
Plaintext
9 lines
563 B
Plaintext
# XAMXAM — orphaned draft cleanup cron job
|
|
# Installed to /etc/cron.d/xamxam-cleanup (system cron format: minute hour dom month dow user command)
|
|
#
|
|
# Deletes draft theses older than 7 days (168h) that have no attached files.
|
|
# Runs every 2 days — drafts only become eligible after 7 days, so this is ample.
|
|
# The script is a dry-run unless --no-dry-run is passed.
|
|
# Eligibility age is configurable via OLDER_THAN_HOURS (default 168).
|
|
0 0 */2 * * www-data php /tmp/cleanup-drafts.php --no-dry-run >> /var/log/xamxam-cleanup-$(date +\%Y-\%m-\%d).log 2>&1
|