{"id":122,"date":"2011-09-26T22:27:22","date_gmt":"2011-09-26T20:27:22","guid":{"rendered":"http:\/\/henry78.at\/?p=122"},"modified":"2011-09-26T22:27:22","modified_gmt":"2011-09-26T20:27:22","slug":"timeout","status":"publish","type":"post","link":"https:\/\/henry78.at\/?p=122","title":{"rendered":"timeout"},"content":{"rendered":"<p>I can&#8217;t believe I&#8217;ve missed this: the <a href=\"http:\/\/www.gnu.org\/s\/coreutils\/manual\/html_node\/timeout-invocation.html#timeout-invocation\">timeout<\/a> command of <a href=\"http:\/\/www.gnu.org\/s\/coreutils\/\">coreutils<\/a>. It kills a job if it runs longer than a specific time. So if you want to make sure your long_running_job is furnished the next day, when production hours start again:<\/p>\n<pre>timeout --kill-after 12h --signal 9 long_running_job<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I can&#8217;t believe I&#8217;ve missed this: the timeout command of coreutils. It kills a job if it runs longer than a specific time. So if you want to make sure your long_running_job is furnished the next day, when production hours start again: timeout &#8211;kill-after 12h &#8211;signal 9 long_running_job<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[],"_links":{"self":[{"href":"https:\/\/henry78.at\/index.php?rest_route=\/wp\/v2\/posts\/122"}],"collection":[{"href":"https:\/\/henry78.at\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/henry78.at\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/henry78.at\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/henry78.at\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=122"}],"version-history":[{"count":0,"href":"https:\/\/henry78.at\/index.php?rest_route=\/wp\/v2\/posts\/122\/revisions"}],"wp:attachment":[{"href":"https:\/\/henry78.at\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/henry78.at\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/henry78.at\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}