How to use it

  1. Fill in the unit name, the command to run (use absolute paths), and the user it should run as.
  2. Copy the .service file into /etc/systemd/system/.
  3. 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.