`systemctl enable opskit-backup.timer` prints `The unit files have no installation config (WantedBy=, RequiredBy=, ...)`, and after a reboot the timer is inactive.
IntermediateTroubleshootingTroubleshooting: cron and systemd timers
Answer
Likely causes → enable creates symlinks based on the [Install] section. The timer has no [Install] section, so there is nothing to link and nothing starts it at boot. A close cousin: enabling the .service instead of the .timer, which starts the backup once at boot and never schedules it.
Diagnose →
systemctl cat opskit-backup.timer | grep -A2 '\[Install\]'
systemctl is-enabled opskit-backup.timer opskit-backup.service
systemctl list-timers --all | grep opskit
Fix →
# /etc/systemd/system/opskit-backup.timer
[Timer]
OnCalendar=*-*-* 02:30:00
Persistent=true
[Install]
WantedBy=timers.target
systemctl daemon-reload
systemctl enable --now opskit-backup.timer
systemctl disable opskit-backup.service 2>/dev/null || true # the service is started by the timer only
Prevent → Template every timer with [Install] WantedBy=timers.target, and verify with systemctl list-timers after a test reboot.
More on Troubleshooting: cron and systemd timers
A new job in `/etc/cron.d/opskit` never runs. Syslog shows `cron[812]: (*system*opskit) ERROR (Missing newline before EOF, this crontab file will be ignored)`.BeginnerYou copied a line from `crontab -e` into `/etc/cron.d/backup`, and syslog shows `Error: bad username; while reading /etc/cron.d/backup`. Meanwhile a teammate's user crontab mails `/bin/sh: 1: root: not found` every night.BeginnerA script works when you run it, but the cron log email says `/opt/opskit/bin/backup.sh: line 22: aws: command not found`.BeginnerThis crontab line never produces a log file, and cron mails `/bin/sh: 1: Syntax error: end of file unexpected (expecting ")")`: `0 2 * * * /opt/backup.sh > /var/log/backup-$(date +%F).log 2>&1`IntermediateA cron job fails intermittently, but there are no emails and no logs. Syslog shows `(CRON) info (No MTA installed, discarding output)`.BeginnerA cron job that runs `docker exec -it db pg_dumpall` fails with `the input device is not a TTY`.Intermediate