From 8baf8d982d94f7b4f12e9b1d8a194e3645539986 Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Sun, 24 Sep 2023 18:19:56 -0700 Subject: [PATCH] Update mu4e sync service and timer --- systemd/mu4e-sync-mail.service | 11 +++++++++++ systemd/mu4e-sync-mail.timer | 12 ++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 systemd/mu4e-sync-mail.service create mode 100644 systemd/mu4e-sync-mail.timer diff --git a/systemd/mu4e-sync-mail.service b/systemd/mu4e-sync-mail.service new file mode 100644 index 0000000..4de325e --- /dev/null +++ b/systemd/mu4e-sync-mail.service @@ -0,0 +1,11 @@ +[Unit] +Description=Sync mail with mu4e + +[Service] +Type=oneshot +ExecStart=emacsclient --eval '(my/mu4e-update-mail-and-index-silent)' +RuntimeMaxSec=3m +Restart=on-failure + +[Install] +WantedBy=default.target diff --git a/systemd/mu4e-sync-mail.timer b/systemd/mu4e-sync-mail.timer new file mode 100644 index 0000000..5533eb1 --- /dev/null +++ b/systemd/mu4e-sync-mail.timer @@ -0,0 +1,12 @@ +[Unit] +Description=Sync mail every minute with mu4e + +[Timer] +OnCalendar=*-*-* *:*:00 +FixedRandomDelay=true +AccuracySec=5s +RandomizedDelaySec=15s +Persistent=yes + +[Install] +WantedBy=default.target