fix rss2email too fast timer
authorIan Kelling <ian@iankelling.org>
Sat, 14 Feb 2026 12:33:49 +0000 (07:33 -0500)
committerIan Kelling <ian@iankelling.org>
Sat, 14 Feb 2026 12:33:49 +0000 (07:33 -0500)
distro-end
filesystem/etc/systemd/system/rss2email.service [new file with mode: 0644]
filesystem/etc/systemd/system/rss2email.timer [new file with mode: 0644]

index cad96224d805445271f9cba09ae0bf19945be5ff..daf16f68dbd904d440836409142f6e8ffe0625f3 100755 (executable)
@@ -1022,38 +1022,6 @@ sudo rm -fv /etc/apt/sources.list.d/iridium-browser.list
 if mountpoint /p &>/dev/null; then
   # note, see bashrc for more documentation.
   pi rss2email
-  sd /etc/systemd/system/rss2email.service <<'EOF'
-[Unit]
-Description=rss2email
-After=multi-user.target
-
-[Service]
-User=iank
-Type=oneshot
-# about 24 hours of failures
-# it copies over its files without respecting symlinks, so
-# we pass options to use different location.
-
-# Todo: we should wrap this in a script which ignores
-# persistent errors about parsing html. Not reporting any errors with sysd-mail-once until then.
-# Systemd also has an output filtering mechanism, we could try that.
-ExecStart=r2e -d /p/c/rss2email.json -c /p/c/rss2email.cfg run
-#ExecStart=/usr/local/bin/sysd-mail-once -288 rss2email r2e -d /p/c/rss2email.json -c /p/c/rss2email.cfg run
-EOF
-  sd /etc/systemd/system/rss2email.timer <<'EOF'
-[Unit]
-Description=rss2email
-
-[Timer]
-# for initial run. required.
-OnActiveSec=30
-# for subsequent runs.
-OnUnitInactiveSec=3000
-
-[Install]
-WantedBy=timers.target
-EOF
-  sudo systemctl daemon-reload
 fi
 
 
diff --git a/filesystem/etc/systemd/system/rss2email.service b/filesystem/etc/systemd/system/rss2email.service
new file mode 100644 (file)
index 0000000..f4a4cda
--- /dev/null
@@ -0,0 +1,16 @@
+[Unit]
+Description=rss2email
+After=multi-user.target
+
+[Service]
+User=iank
+Type=oneshot
+# about 24 hours of failures
+# it copies over its files without respecting symlinks, so
+# we pass options to use different location.
+
+# Todo: we should wrap this in a script which ignores
+# persistent errors about parsing html. Not reporting any errors with sysd-mail-once until then.
+# Systemd also has an output filtering mechanism, we could try that.
+ExecStart=r2e -d /p/c/rss2email.json -c /p/c/rss2email.cfg run
+#ExecStart=/usr/local/bin/sysd-mail-once -288 rss2email r2e -d /p/c/rss2email.json -c /p/c/rss2email.cfg run
diff --git a/filesystem/etc/systemd/system/rss2email.timer b/filesystem/etc/systemd/system/rss2email.timer
new file mode 100644 (file)
index 0000000..2326e5f
--- /dev/null
@@ -0,0 +1,9 @@
+[Unit]
+Description=rss2email
+
+[Timer]
+# every hour, 9 minutes after the hour
+OnCalendar=*-*-* *:09
+
+[Install]
+WantedBy=timers.target