{"id":282,"date":"2019-05-14T13:47:29","date_gmt":"2019-05-14T13:47:29","guid":{"rendered":"https:\/\/blog.iabsolute.com\/?p=282"},"modified":"2019-05-14T13:47:29","modified_gmt":"2019-05-14T20:47:29","slug":"auto-rebooting-scheudle-for-linux-server","status":"publish","type":"post","link":"https:\/\/blog.iabsolute.com\/?p=282","title":{"rendered":"Auto rebooting scheudle for LINUX server"},"content":{"rendered":"\n<p>the command to reboot should be something like \u201cshutdown -r now\u201d, where -r means to reboot (as opposed to -h which is halt).<\/p>\n\n\n\n<p>Cron is the process for executing commands at a scheduled time. Crontab is the facility to schedule cron jobs. Cron jobs can be run by any user, but because you want to reboot, you\u2019ll need to do this as root.<\/p>\n\n\n\n<p>Edit the cron table:<br>\n&gt; crontab -e<\/p>\n\n\n\n<p>Now you are in vi, editing the cron table. Add a line like:<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">0 1 * * * shutdown -r now &gt;\/dev\/null<\/h1>\n\n\n\n<p>This command says, when the minute is 0 and the hour is 1, execute the command \u201cshutdown -r now\u201d and send any standard output to \/dev\/null (which cause the output to be thrown away).<\/p>\n\n\n\n<p>If you wanted this to happen on only Monday and Friday, you\u2019d change one of the <a href=\"http:\/\/blogs.iabsolute.com\/?p=710#\">asterisks<\/a> (first one I believe) to 1,5 (sunday is 0). Do a man on crontab for more details.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>the command to reboot should be something like \u201cshutdown -r now\u201d, where -r means to reboot (as opposed to -h which is halt). Cron is the process for executing commands at a scheduled time. Crontab is the facility to schedule &hellip; <a href=\"https:\/\/blog.iabsolute.com\/?p=282\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-282","post","type-post","status-publish","format-standard","hentry","category-my-linux"],"_links":{"self":[{"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/posts\/282","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=282"}],"version-history":[{"count":1,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/posts\/282\/revisions"}],"predecessor-version":[{"id":283,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/posts\/282\/revisions\/283"}],"wp:attachment":[{"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}