Go to the content
or

Debian

 Go back to Planet Debian
Full screen Suggest an article

Lucas Nussbaum: systemd services, and queue management?

August 11, 2017 12:40 , by Planet Debian - 0no comments yet | No one following this article yet.
Viewed 3 times

I’ve been increasingly using systemd timers as a replacement for cron jobs. The fact that you get free logging is great, and also the fact that you don’t have to care about multiple instances running simultaneously.

However, sometimes I would be interested in more complex scenarios, such as:

  • I’d like to trigger a full run of the service unit: if the service is not running, it should be started immediately. If it’s currently running, it should be started again when it terminates.
  • Same as the above, but with queue coalescing: If I do the above multiple times in a row, I only want the guarantee that there’s one full run of the service after the last time I triggered it (typical scenario: each run processes all pending events, so there’s no point in running multiple times).

Is this doable with systemd? If not, how do people do that outside of systemd?


Source: http://www.lucas-nussbaum.net/blog/?p=930

0no comments yet

Post a comment

The fields are mandatory.

If you are a registered user, you can login and be automatically recognized.