{"id":930,"date":"2017-08-11T14:40:36","date_gmt":"2017-08-11T12:40:36","guid":{"rendered":"http:\/\/www.lucas-nussbaum.net\/blog\/?p=930"},"modified":"2018-01-07T22:30:43","modified_gmt":"2018-01-07T20:30:43","slug":"systemd-services-and-queue-management","status":"publish","type":"post","link":"https:\/\/www.lucas-nussbaum.net\/blog\/?p=930","title":{"rendered":"systemd services, and queue management?"},"content":{"rendered":"<p>I&#8217;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&#8217;t have to care about multiple instances running simultaneously.<\/p>\n<p>However, sometimes I would be interested in more complex scenarios, such as:<\/p>\n<ul>\n<li>I&#8217;d like to trigger a full run of the service unit: if the service is not running, it should be started immediately. If it&#8217;s currently running, it should be started again when it terminates.<\/li>\n<li>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&#8217;s one full run of the service after the last time I triggered it (typical scenario: each run processes all pending events, so there&#8217;s no point in running multiple times).<\/li>\n<\/ul>\n<p>Is this doable with systemd? If not, how do people do that outside of systemd?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;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&#8217;t have to care about multiple instances running simultaneously. However, sometimes I would be interested in more complex scenarios, such as: I&#8217;d like to trigger a full run [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,13],"tags":[],"class_list":["post-930","post","type-post","status-publish","format-standard","hentry","category-debianubuntu","category-planetdebian"],"_links":{"self":[{"href":"https:\/\/www.lucas-nussbaum.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/930","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lucas-nussbaum.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lucas-nussbaum.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lucas-nussbaum.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lucas-nussbaum.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=930"}],"version-history":[{"count":3,"href":"https:\/\/www.lucas-nussbaum.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/930\/revisions"}],"predecessor-version":[{"id":935,"href":"https:\/\/www.lucas-nussbaum.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/930\/revisions\/935"}],"wp:attachment":[{"href":"https:\/\/www.lucas-nussbaum.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=930"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lucas-nussbaum.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=930"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lucas-nussbaum.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=930"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}