From a25d8e45306d0f7694f72cf7b6126b70508b1f8b Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Fri, 7 Feb 2025 13:15:49 -0500 Subject: [PATCH] [systemd] Add nyt service and timer --- systemd/.config/systemd/user/nyt-downloader.service | 7 +++++++ systemd/.config/systemd/user/nyt-downloader.timer | 10 ++++++++++ 2 files changed, 17 insertions(+) create mode 100644 systemd/.config/systemd/user/nyt-downloader.service create mode 100644 systemd/.config/systemd/user/nyt-downloader.timer diff --git a/systemd/.config/systemd/user/nyt-downloader.service b/systemd/.config/systemd/user/nyt-downloader.service new file mode 100644 index 0000000..cdd2323 --- /dev/null +++ b/systemd/.config/systemd/user/nyt-downloader.service @@ -0,0 +1,7 @@ +[Unit] +Description="Download latest NYT cover" +Requires=nyt-downloader.timer + +[Service] +Type=simple +ExecStart=/usr/local/bin/nyt diff --git a/systemd/.config/systemd/user/nyt-downloader.timer b/systemd/.config/systemd/user/nyt-downloader.timer new file mode 100644 index 0000000..ab22638 --- /dev/null +++ b/systemd/.config/systemd/user/nyt-downloader.timer @@ -0,0 +1,10 @@ +[Unit] +Description="Timer for the NYT downloader" + +[Timer] +Unit=nyt-downloader.service +OnBootSec=5min +OnCalendar=*-*-* 08:00:00 + +[Install] +WantedBy=timers.target