mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-09-25 01:53:03 +02:00
11 lines
681 B
Plaintext
11 lines
681 B
Plaintext
# XAMXAM — abandoned upload garbage-collection cron job
|
|
# Installed to /etc/cron.d/xamxam-tmp-cleanup (system cron format: minute hour dom month dow user command)
|
|
#
|
|
# Deletes staging upload dirs in <storage>/tmp/filepond/ that are abandoned:
|
|
# - whose referencing PHP session no longer exists, or
|
|
# - older than the 2h safety fallback.
|
|
# These are never linked to a published TFE, so removing them is risk-free GC.
|
|
# Script is a dry-run unless --no-dry-run is passed.
|
|
# Age threshold overridable via TMP_UPLOAD_MAX_AGE_SECONDS (default 7200).
|
|
5 * * * * www-data php /tmp/cleanup-tmp-uploads.php --no-dry-run >> /var/log/xamxam-tmp-cleanup-$(date +\%Y-\%m-\%d).log 2>&1
|