initial commit

This commit is contained in:
Mark Eaton
2025-12-12 07:46:39 -05:00
commit a5e46864d8
5 changed files with 121 additions and 0 deletions
@@ -0,0 +1,21 @@
# lives at ~/.config/systemd/user/libguides-notifier.service
# User-level systemd service to run main.py
# Uses a wrapper script so the working directory and .env are found correctly.
# Configuration is via ~/.config/libguides-notifier.env, no in-file path edits needed.
# Create that file with one line:
# REPO_PATH=/absolute/path/to/this/repo
# Then run:
# systemctl --user daemon-reload
[Unit]
Description=Run main.py (LibGuides notifier)
Wants=network-online.target NetworkManager-wait-online.service
After=network-online.target
[Service]
Type=oneshot
EnvironmentFile=%h/.config/libguides-notifier.env
ExecStart=/bin/bash -lc '${REPO_PATH}/scripts/run_main.sh'
[Install]
WantedBy=default.target
@@ -0,0 +1,20 @@
# lives at ~/.config/systemd/user/libguides-notifier.timer
# User-level systemd timer that "catches up" missed runs if the machine was off.
[Unit]
Description=Schedule main.py with catch-up if missed
[Timer]
# Change this to your desired schedule; examples:
# OnCalendar=daily
# OnCalendar=Mon..Fri 09:00
# See man systemd.time for syntax.
OnCalendar=*-*-03,18 09:00:00
Timezone=America/New_York
Persistent=true
AccuracySec=1m
RandomizedDelaySec=5m
Unit=libguides-notifier.service
[Install]
WantedBy=timers.target