How do you run a user-level timer, and why does it stop when you log out?
AdvancedConceptcron and systemd timers
Answer
Put units in ~/.config/systemd/user/ and manage them with systemctl --user. The user's systemd instance only runs while the user has a session, so timers stop at logout and do not start at boot, unless lingering is enabled:
systemctl --user daemon-reload
systemctl --user enable --now report.timer
sudo loginctl enable-linger "$USER"
journalctl --user -u report.service
For production server jobs, prefer system units with User=svc-account.
More on cron and systemd timers
Explain the five cron time fields with examples.BeginnerWhat is different about the environment a cron job runs in?BeginnerWhat is the difference between a user crontab, `/etc/crontab`, `/etc/cron.d/` and `/etc/cron.daily/`?IntermediateHow do you prevent overlapping cron runs and capture output properly?IntermediateWhat is a systemd timer and how does it compare to cron?IntermediateWrite a minimal systemd service and timer that run a backup at 02:30 daily.Intermediate