summaryrefslogtreecommitdiff
path: root/assets/outbox/log-cleanup-cron-setup.txt
blob: 7549bc2cd73dd2c928589e95ba41c6fa798fee57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Log Cleanup Cron Job
====================

Added: 2026-02-26

What: Daily cleanup of session log files in ~/.local/var/log

Problem: Hyprland, waybar, dunst, hypridle, and gammastep each create a new
timestamped log file per session (e.g., dunst-2026-02-26-050000.log). Without
cleanup these accumulate indefinitely (~270 files / 3MB as of Feb 2026).

Solution: A cron job runs daily at noon, deleting .log files older than 7 days.

Files added to archsetup:
- dotfiles/common/.local/bin/cron/log-cleanup  (the script)

Installation on fresh system:
1. Symlink is created by stow/dotfile install (same as checkup, crontog)
2. Add to crontab:
   crontab -e
   # Add this line:
   0 12 * * * $HOME/.local/bin/cron/log-cleanup