Interview Prep/Shell Scripting/Troubleshooting: cron and systemd timers

You edited the timer from 5 minutes to 1 minute, restarted it, but it still fires every 5 minutes. `systemctl` printed `Warning: The unit file, source configuration file or drop-ins of opskit-health.timer changed on disk. Run 'systemctl daemon-reload' to reload units.`

BeginnerTroubleshootingTroubleshooting: cron and systemd timers
Answer

Likely causes → systemd caches unit definitions. Editing the file on disk changes nothing until the manager reloads its configuration; restarting the unit reuses the cached version.

Diagnose →

systemctl show opskit-health.timer -p NeedDaemonReload    # yes
systemctl show opskit-health.timer -p TimersMonotonic      # still shows the old interval

Fix →

systemctl daemon-reload
systemctl restart opskit-health.timer
systemctl list-timers opskit-health.timer

Prevent → Use systemctl edit --full opskit-health.timer (or systemctl edit for drop-ins), which reloads automatically, and make config management run daemon-reload whenever a unit file changes.

All Shell Scripting questions Roadmap: Shell scripting (Bash)

More on Troubleshooting: cron and systemd timers