{"id":22733,"date":"2018-09-12T16:24:19","date_gmt":"2018-09-12T20:24:19","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=22733"},"modified":"2018-09-12T16:24:19","modified_gmt":"2018-09-12T20:24:19","slug":"backup-on-connect-launchd-and-throttleinterval","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2018\/09\/12\/backup-on-connect-launchd-and-throttleinterval\/","title":{"rendered":"Backup on Connect, launchd, and ThrottleInterval"},"content":{"rendered":"<p><a href=\"https:\/\/www.shirt-pocket.com\/blog\/index.php\/shadedgrey\/comments\/backup_on_connect_launchd_and_throttleinterval\/\">Dave Nanian<\/a> (<a href=\"https:\/\/twitter.com\/dnanian\/status\/1038833231599157250\">tweet<\/a>):<\/p>\n<blockquote cite=\"https:\/\/www.shirt-pocket.com\/blog\/index.php\/shadedgrey\/comments\/backup_on_connect_launchd_and_throttleinterval\/\"><p>But that wasn&rsquo;t the problem. The problem is what the man page <strong>isn&rsquo;t<\/strong> saying, but is implied in the last part: &ldquo;jobs should linger around just in case they are needed again&rdquo; is the key.<\/p><p>Basically, the job <strong>must<\/strong> run for at least as long as the <code>ThrottleInterval<\/code> is set to (default = 10 seconds). If it doesn&rsquo;t run for that long, it respawns the job, adjusted by a certain amount of time, even when the condition <strong>isn&rsquo;t triggered again<\/strong>.<\/p><p>So, in our case, we&rsquo;d do our thing quickly and quit. But we didn&rsquo;t run for the minimum amount of time, and that caused the logging. <code>launchd<\/code> would then respawn us. We wouldn&rsquo;t have anything to do, so we&rsquo;d quit quickly again, repeating the cycle.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Dave Nanian (tweet): But that wasn&rsquo;t the problem. The problem is what the man page isn&rsquo;t saying, but is implied in the last part: &ldquo;jobs should linger around just in case they are needed again&rdquo; is the key.Basically, the job must run for at least as long as the ThrottleInterval is set to (default = [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2018-09-12T20:24:21Z","apple_news_api_id":"10b841e7-b05d-4d5d-b4f7-d27908961bb3","apple_news_api_modified_at":"2018-09-12T20:24:23Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AELhB57BdTV2099J5CJYbsw","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[],"tags":[164,500,30,32,1529,369],"class_list":["post-22733","post","type-post","status-publish","format-standard","hentry","tag-documentation","tag-launchd","tag-mac","tag-macapp","tag-macos-10-13","tag-superduper"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/22733","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=22733"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/22733\/revisions"}],"predecessor-version":[{"id":22734,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/22733\/revisions\/22734"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=22733"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=22733"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=22733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}