adding systemd service and timer script to run automatically

This commit is contained in:
Andrew Davidson 2021-09-28 07:59:36 -07:00
parent 19a0be2ba8
commit 7b3f3fd78e
Signed by: amd
GPG key ID: 17AF8F2A49CF25C6
2 changed files with 28 additions and 0 deletions

11
archivist.service Normal file
View file

@ -0,0 +1,11 @@
[Unit]
Description=Update remote ip address regularly
[Service]
Environment=XDG_CONFIG_HOME=/home/FIXME/.config
Environment=XDG_DATA_HOME=/home/FIXME/.local/share
Type=simple
ExecStart=/home/FIXME/.local/share/archivist/bin/cron.sh
[Install]
WantedBy=default.target

17
archivist.timer Normal file
View file

@ -0,0 +1,17 @@
[Unit]
Description=Run archive of internet sites every day
RefuseManualStart=no # Allow manual starts
RefuseManualStop=no # Allow manual stops
[Timer]
# Execute job if it missed a run due to machine being off
Persistent=true
# Run 120 seconds after boot for the first time
OnBootSec=900
# Run every 1 minute thereafter
OnUnitInactiveSec=86400
# File describing job to execute
Unit=archivist.service
[Install]
WantedBy=timers.target