{"id":8422,"date":"2016-02-02T22:34:02","date_gmt":"2016-02-02T22:34:02","guid":{"rendered":"https:\/\/wp.okra.host\/article\/setting-a-task-to-run-at-startup\/"},"modified":"2021-03-07T14:11:27","modified_gmt":"2021-03-07T13:11:27","slug":"setting-a-task-to-run-at-startup","status":"publish","type":"ht_kb","link":"https:\/\/kb.okra.host\/de\/article\/setting-a-task-to-run-at-startup\/","title":{"rendered":"Setting a task to run at startup"},"content":{"rendered":"<h2 id=\"overview\" >\u00dcbersicht<\/h2>\n<p>Services or scripts may be set to run upon server start within the <a href=\"https:\/\/kb.okra.host\/de\/control-panel\/logging-into-the-control-panel\/\">Bedienfeld<\/a>\u00a0or via <a href=\"https:\/\/apnscp.com\/linux-man\/man5\/crontab.5.html\">crontab(5)<\/a>\u00a0from the <a href=\"https:\/\/kb.okra.host\/de\/terminal\/accessing-terminal\/\">Terminal<\/a>. Either solution requires task scheduling support, which is found on <a href=\"https:\/\/apnscp.com\/hosting\">Developer+<\/a> packages.<\/p>\n<h3 id=\"within-the-control-panel\" >Within the control panel<\/h3>\n<p>Visit <strong>Dev<\/strong> &gt; <strong>Task Scheduler<\/strong> to add a new routinely scheduled task. Command syntax follows the same as a normal task, but for the time specification, select <code>@reboot<\/code>. The job will start on server start. If there are issues with starting the application or the application fails to remain running, then it will remain down.<\/p>\n<h3 id=\"from-the-terminal\" >From the terminal<\/h3>\n<p>Use <code>crontab -e<\/code> to edit your crontab. Instead of specifying a time (min\/hour\/day\/day of week\/day of month), specify <code>@reboot<\/code>, e.g.<\/p>\n<p><code>@reboot touch \/tmp\/restart<\/code><\/p>","protected":false},"excerpt":{"rendered":"<p>Overview Services or scripts may be set to run upon server start within the control panel\u00a0or via crontab(5)\u00a0from the terminal. Either solution requires task scheduling support, which is found on Developer+ packages. Within the control panel Visit Dev &gt; Task Scheduler to add a new routinely scheduled task. Command syntax&#8230;<\/p>","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[56],"ht-kb-tag":[],"class_list":["post-8422","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-control-panel"],"_links":{"self":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8422","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/comments?post=8422"}],"version-history":[{"count":1,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8422\/revisions"}],"predecessor-version":[{"id":8423,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8422\/revisions\/8423"}],"wp:attachment":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/media?parent=8422"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-category?post=8422"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-tag?post=8422"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}