From 0f7e79849d5e0dbc4a0788e93b254a7efef60fc4 Mon Sep 17 00:00:00 2001 From: Joseph Montanaro Date: Tue, 2 Sep 2025 08:11:02 -0400 Subject: [PATCH] add clear-downloads script/service/timer --- dot_config/systemd/user/clear-downloads.service | 7 +++++++ dot_config/systemd/user/clear-downloads.timer | 10 ++++++++++ .../timers.target.wants/symlink_clear-downloads.timer | 1 + 3 files changed, 18 insertions(+) create mode 100644 dot_config/systemd/user/clear-downloads.service create mode 100644 dot_config/systemd/user/clear-downloads.timer create mode 100644 dot_config/systemd/user/timers.target.wants/symlink_clear-downloads.timer diff --git a/dot_config/systemd/user/clear-downloads.service b/dot_config/systemd/user/clear-downloads.service new file mode 100644 index 0000000..dd0ebd8 --- /dev/null +++ b/dot_config/systemd/user/clear-downloads.service @@ -0,0 +1,7 @@ +[Unit] +Description=Delete downloads older than 24h + +[Service] +Type=oneshot +ExecStart=/home/joe/.local/bin/clear-downloads + diff --git a/dot_config/systemd/user/clear-downloads.timer b/dot_config/systemd/user/clear-downloads.timer new file mode 100644 index 0000000..44edb35 --- /dev/null +++ b/dot_config/systemd/user/clear-downloads.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Run clear-downloads service once a day +Requires=clear-downloads.service + +[Timer] +OnCalendar=daily +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/dot_config/systemd/user/timers.target.wants/symlink_clear-downloads.timer b/dot_config/systemd/user/timers.target.wants/symlink_clear-downloads.timer new file mode 100644 index 0000000..1bb40c1 --- /dev/null +++ b/dot_config/systemd/user/timers.target.wants/symlink_clear-downloads.timer @@ -0,0 +1 @@ +/home/joe/.config/systemd/user/clear-downloads.timer