Files
teams-bot/docs/monitoring.md
T
2025-11-16 02:14:25 -05:00

29 lines
1.3 KiB
Markdown

# Monitoring libguides-notifier jobs
Quick checks
- Next and last run times (look for libguides-notifier.timer):
systemctl --user list-timers --all
- Timer and service health:
systemctl --user status libguides-notifier.timer libguides-notifier.service
- Recent run output (stdout/stderr from main.py):
journalctl --user -u libguides-notifier.service -n 200 --no-pager
- Follow logs live:
journalctl --user -u libguides-notifier.service -f
Manual operations
- Run immediately (without waiting for the timer):
systemctl --user start libguides-notifier.service
- Enable or disable the timer at login:
systemctl --user enable --now libguides-notifier.timer
systemctl --user disable --now libguides-notifier.timer
- Reload user units after editing *.service/*.timer files:
systemctl --user daemon-reload
- Inspect the effective units systemd is using:
systemctl --user cat libguides-notifier.service
systemctl --user cat libguides-notifier.timer
Notes
- The timer uses Persistent=true, so if a scheduled time was missed while the laptop was off, one catch-up run will happen when the machine is back on.
- All print() output from main.py appears in journalctl for libguides-notifier.service.
- Time zone for scheduling is set in the timer unit: Timezone=America/New_York.