{"id":45,"date":"2007-12-10T21:33:51","date_gmt":"2007-12-10T20:33:51","guid":{"rendered":"http:\/\/www.amikkelsen.com\/?p=45"},"modified":"2007-12-10T22:05:47","modified_gmt":"2007-12-10T21:05:47","slug":"crontab","status":"publish","type":"post","link":"https:\/\/www.amikkelsen.com\/?p=45","title":{"rendered":"Crontab"},"content":{"rendered":"<p>To edit the crontab type (it normally uses vi as editor)<br \/>\n<span style=\"font-size: 11pt; line-height: 115%; font-family: 'Courier New'\">crontab -e<\/span><\/p>\n<p>To add a scheduled type<br \/>\n<span style=\"font-size: 11pt; line-height: 115%; font-family: 'Courier New'\">0 21 * * 1-7 perl \/tmp\/test.pl<\/span><\/p>\n<p>To make sure the crontab is updated correctly restart it<br \/>\n<span style=\"font-size: 11pt; line-height: 115%; font-family: 'Courier New'\">\/etc\/init.d\/cron restart<\/span><\/p>\n<p>Explanation<br \/>\n0       Minutes (0-59)<br \/>\n21     Hour (0-23)<br \/>\n*       Day (1-31)<br \/>\n*       Month  (1-12)<br \/>\n0-7    Weekday (0-7, Sunday = 0)<\/p>\n<p>Exampels<br \/>\n*\/5 * * * *         &#8220;Runs every 5 minute, every day, all year&#8221;<br \/>\n*\/5 1,10 1,6 * &#8220;Runs every 5 minutes, January and July 1 and 10&#8221;<\/p>\n<p><a href=\"http:\/\/www.adminschoice.com\/docs\/crontab.htm\" target=\"_blank\" title=\"More information\">Readmore<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To edit the crontab type (it normally uses vi as editor) crontab -e To add a scheduled type 0 21 * * 1-7 perl \/tmp\/test.pl To make sure the crontab is updated correctly restart it \/etc\/init.d\/cron restart Explanation 0 Minutes (0-59) 21 Hour (0-23) * Day (1-31) * Month (1-12) 0-7 Weekday (0-7, Sunday =\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.amikkelsen.com\/?p=45\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-45","post","type-post","status-publish","format-standard","hentry","category-linux-commands"],"_links":{"self":[{"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/posts\/45","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=45"}],"version-history":[{"count":0,"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/posts\/45\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=45"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=45"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=45"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}