2

I noticed today that a systemd timer I disabled several days ago is still running. And disabling it again appears to have no effect. I'm probably missing something fundamental here (I'm quite new to systemd), but all I've really done is follow what appears to be the general advice online.

root@nla-cloud:/var/log# systemctl list-timers
NEXT                         LEFT       LAST                         PASSED   UNIT                         ACTIVATES
Fri 2017-10-13 00:00:00 UTC  13h left   Thu 2017-10-12 00:00:01 UTC  10h ago  delete_dummies.timer         delete_dummies.service

No feedback here to say symlink removed (which is what happened the first time I disabled it - log lost):

root@nla-cloud:/var/log# systemctl disable delete_dummies.timer

Yep, still active and waiting ...

root@nla-cloud:/var/log# systemctl status delete_dummies.timer
delete_dummies.timer - Deletes dummy devices at midnight
   Loaded: loaded (/lib/systemd/system/delete_dummies.timer; disabled; vendor preset: enabled)
   Active: active (waiting) since Thu 2017-10-05 09:22:44 UTC; 1 weeks 0 days ago

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

Timer:

[Unit]
Description=Deletes dummy devices at midnight

[Timer]
OnCalendar=daily
Persistent=true

[Install]
WantedBy=multi-user.target

Unit:

[Unit]
Description=Delete dummy device entries.

[Service]
Type=simple
ExecStart=/usr/bin/delete_dummies.sh

I love systemd.

  • 6
    Did you try systemctl stop delete_dummies.timer? I'm not sure about timer units, but most other units still have to be manually stopped after being disabled. – Austin Hemmelgarn Oct 12 '17 at 19:17
  • Nope, will try. – whoasked Oct 13 '17 at 10:17
  • 1
    Not a single place I looked said to stop it, just disable. But it seems Sir you're right. Thank you. – whoasked Oct 13 '17 at 10:19
  • 1
    @whoasked The "disable" command will prevent it from starting on the next boot. The "stop" command will make the service (or timer) stop running on the running system. You can also do "disable --now" which will both disable it (for next boots) and stop it (for now.) Hope this helps! – filbranden Mar 15 '18 at 20:18
  • @AustinHemmelgarn I have spent hours to get to this point. Nowhere to be found. Thank you sir! Even after deleting the timer (ie, disable & remove it from disk) it still showed up in list-timers. But after stop it actually was gone. – Stefan Hendriks Dec 11 '18 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.