diff --git a/.config/systemd/user/offlineimap-oneshot.service b/.config/systemd/user/offlineimap-oneshot.service new file mode 100644 index 0000000..7664ca6 --- /dev/null +++ b/.config/systemd/user/offlineimap-oneshot.service @@ -0,0 +1,10 @@ +[Unit] +Description=Run offlineimap with my specifications +After=network.target + +[Service] +ExecStart=/run/current-system/sw/bin/docker run -v /home/josiah/.config/offlineimap/:/mnt/config -v /home/josiah/qj/fastmail:/mnt/mail -v /home/josiah/qj/mail.log:/mnt/log -e MAILLOG=TRUE maxkratz/offlineimap:latest +TimeoutStartSec=3600 + +[Install] +WantedBy=default.target diff --git a/.config/systemd/user/offlineimap-oneshot.timer b/.config/systemd/user/offlineimap-oneshot.timer new file mode 100644 index 0000000..3693f6f --- /dev/null +++ b/.config/systemd/user/offlineimap-oneshot.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Run offlineimap every 30 minutes + +[Timer] +OnBootSec=30min +OnUnitActiveSec=1day + +[Install] +WantedBy=timers.target