How to use it
- Fill in the unit name, the command to run (use absolute paths), and the user it should run as.
- Copy the
.servicefile into/etc/systemd/system/. - Reload and enable it:
sudo systemctl daemon-reload
sudo systemctl enable --now yourname.service
Check it with systemctl status yourname and follow its logs with journalctl -u yourname -f.
Service or timer
Leave the timer unticked for something that should stay running, such as a web app or a bot; systemd will restart it if it crashes. Tick the timer for something that runs and exits, such as a nightly backup or a sync job. A timer is the modern replacement for a cron entry: it logs to the journal, survives reboots, and can catch up on a missed run.
