{"id":501,"date":"2012-01-13T12:09:40","date_gmt":"2012-01-13T17:09:40","guid":{"rendered":"http:\/\/www.serverprontouniversity.com\/?p=501"},"modified":"2018-08-16T23:25:22","modified_gmt":"2018-08-17T04:25:22","slug":"support-of-the-day-dead-scripts","status":"publish","type":"post","link":"https:\/\/www.serverpronto.com\/spu\/2012\/01\/support-of-the-day-dead-scripts\/","title":{"rendered":"Support of the day: Dead Scripts"},"content":{"rendered":"<div id=\"_mcePaste\">If you regularly work with scripts on any Unix or Linux platform and it gets killed when you log out from ssh, the session dies or the scripts stop working after x time then you need to down it and fork it to the background.<\/div>\n<div><\/div>\n<div id=\"_mcePaste\">So instead of running<\/div>\n<pre style=\"padding-left: 30px;\">\/your\/script\/filename<\/pre>\n<div>run<\/div>\n<pre style=\"padding-left: 30px;\">nohup \/your\/script\/filename &amp;<\/pre>\n<div style=\"padding-left: 30px;\"><\/div>\n<div id=\"_mcePaste\">What this does is start the script, the nohup downs the scripts (meaning that it has no owner so you can log out without killing the process) and the &amp; at the end sends the process to the background.\u00c2\u00a0This is the alternative method to run something from within screen but this version works well with a crontab.<\/div>\n<div><\/div>\n<div id=\"_mcePaste\">FYI the crontab is a file and a program (both named the same) that executes commands (opening files, sending email, any command that you could do via the regular shell) at specific interval or times.<\/div>\n<div><\/div>\n<div><a href=\"https:\/\/www.serverpronto.com\">ServerPronto<\/a> offers the best affordable and secure hosting service in all dedicated server packages.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>If you regularly work with scripts on any Unix or Linux platform and it gets killed when you log out from ssh, the session dies or the scripts stop working after x time then you need to down it and fork it to the background. So instead of running \/your\/script\/filename run nohup \/your\/script\/filename &amp; What<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[64],"tags":[123,17,112,22,18],"class_list":["post-501","post","type-post","status-publish","format-standard","category-support-of-the-day","tag-cloud","tag-dedicated-server","tag-hosting","tag-server","tag-web-hosting"],"_links":{"self":[{"href":"https:\/\/www.serverpronto.com\/spu\/wp-json\/wp\/v2\/posts\/501","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.serverpronto.com\/spu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.serverpronto.com\/spu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.serverpronto.com\/spu\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.serverpronto.com\/spu\/wp-json\/wp\/v2\/comments?post=501"}],"version-history":[{"count":3,"href":"https:\/\/www.serverpronto.com\/spu\/wp-json\/wp\/v2\/posts\/501\/revisions"}],"predecessor-version":[{"id":2624,"href":"https:\/\/www.serverpronto.com\/spu\/wp-json\/wp\/v2\/posts\/501\/revisions\/2624"}],"wp:attachment":[{"href":"https:\/\/www.serverpronto.com\/spu\/wp-json\/wp\/v2\/media?parent=501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.serverpronto.com\/spu\/wp-json\/wp\/v2\/categories?post=501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.serverpronto.com\/spu\/wp-json\/wp\/v2\/tags?post=501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}