{"id":298,"date":"2020-07-07T02:59:10","date_gmt":"2020-07-06T18:59:10","guid":{"rendered":"https:\/\/byy3.com\/?p=298"},"modified":"2021-01-09T10:14:23","modified_gmt":"2021-01-09T02:14:23","slug":"linux-ubuntu-%e6%b7%bb%e5%8a%a0crontab%e8%ae%a1%e5%88%92%e4%bb%bb%e5%8a%a1","status":"publish","type":"post","link":"https:\/\/byy3.com\/?p=298","title":{"rendered":"linux ubuntu \u6dfb\u52a0crontab\u8ba1\u5212\u4efb\u52a1"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">sudo apt-get install cron \u5b89\u88c5crontab <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\u6dfb\u52a0\u4efb\u52a1# crontab -e \u8fd0\u884c \u9009\u62e92 nano\u8fdb\u884c\u7f16\u8f91<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">*** \u4efb\u52a1\u547d\u4ee4\u9700\u8981\u7edd\u5bf9\u8def\u5f84 \u5982*\/60 * * * * cd root &amp;&amp; \/usr\/bin\/python3.7 test.py >> \/root\/cron-rdv.py.log 2>&amp;1<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7f16\u8f91\u6dfb\u52a0\u4efb\u52a1*\/2 * * * * \/root\/auto.sh \u6bcf2\u5206\u949f\u8fd0\u884c\u4e00\u6b21<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6dfb\u52a0\u4efb\u52a1*\/60 * * * * sh auto.sh &gt;&gt; \/root\/cron-rdv.py.log 2&gt;&amp;1 <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6ce8\u89e3\uff1a\u6bcf60\u5206\u949f\u8fd0\u884c\u4e00\u6b21\u610f\u601d\u662f\u6bcf\u4e2a\u4e24\u5206\u949f\u5c31\u7528python\u6267\u884c\/data5\u76ee\u5f55\u4e0b\u7684crontest.py\uff0c\u5c06\u65e5\u5fd7\u8f93\u51fa\u503ccrontest.py.log\u4e2d\uff0c\u5f53\u7136\uff0c\u7a0b\u5e8fcrongtest.py\u4e2d\u7684\u8f93\u5165\u5230\u6307\u5b9a\u6587\u4ef6\u7684\u6570\u636e\u662f\u4e0d\u4f1a\u8f93\u5165\u5230\u8be5log\u6587\u4ef6\u4e2d\u7684\uff0c\u540e\u9762\u90a3\u4e2a2>&amp;1\u7684\u610f\u601d\u662f\u628a\u9519\u8bef\u7684\u8f93\u51fa\u4e5f\u8f93\u51fa\u5230\u6807\u51c6\u8f93\u51fa\uff082\u8868\u793a\u9519\u8bef\uff0c2>\u8868\u793a\u9519\u8bef\u8f93\u51fa\uff0c&amp;\u8868\u793a\u7b49\u540c\u4e8e\uff0c1\u8868\u793a\u6b63\u786e\uff09\uff0c\u56e0\u6b64\u5982\u679c\u8fd0\u884c\u51fa\u9519\u548c\u6b63\u786e\u90fd\u4f1a\u628a\u7ed3\u679c\u8f93\u51fa\u5230\u4e4b\u524d\u5b9a\u4e49\u7684log\u4e2d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">tail -f \/var\/log\/syslog \u67e5\u770b\u7cfb\u7edf\u65e5\u5fd7<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">auto.sh \u6e90\u6587\u4ef6<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">python3 \/root\/rdv-prefecture.py #\u4fdd\u5b58\u5230auto.sh\u6587\u4ef6 \u653e\u5230\/root\/\u6587\u4ef6\u5939\u4e0b\u9762<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">crontab -l\u67e5\u770b\u4efb\u52a1 crontab -r\u79fb\u9664\u4efb\u52a1 crontab -ir\u79fb\u9664\u6240\u4ee5\u4efb\u52a1<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> \u6700\u540eservice cron start \u6216 service cron restart<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5b9e\u4f8b<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b9e\u4f8b1\uff1a\u6bcf1\u5206\u949f\u6267\u884c\u4e00\u6b21myCommand<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">* * * * * myCommand<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b9e\u4f8b2\uff1a\u6bcf\u5c0f\u65f6\u7684\u7b2c3\u548c\u7b2c15\u5206\u949f\u6267\u884c<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">3,15 * * * * myCommand<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b9e\u4f8b3\uff1a\u5728\u4e0a\u53488\u70b9\u523011\u70b9\u7684\u7b2c3\u548c\u7b2c15\u5206\u949f\u6267\u884c<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">3,15 8-11 * * * myCommand<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b9e\u4f8b4\uff1a\u6bcf\u9694\u4e24\u5929\u7684\u4e0a\u53488\u70b9\u523011\u70b9\u7684\u7b2c3\u548c\u7b2c15\u5206\u949f\u6267\u884c<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">3,15 8-11 *\/2 * * myCommand<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b9e\u4f8b5\uff1a\u6bcf\u5468\u4e00\u4e0a\u53488\u70b9\u523011\u70b9\u7684\u7b2c3\u548c\u7b2c15\u5206\u949f\u6267\u884c<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">3,15 8-11 * * 1 myCommand<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b9e\u4f8b6\uff1a\u6bcf\u665a\u768421:30\u91cd\u542fsmb<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">30 21 * * * \/etc\/init.d\/smb restart<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b9e\u4f8b7\uff1a\u6bcf\u67081\u300110\u300122\u65e5\u76844 : 45\u91cd\u542fsmb<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">45 4 1,10,22 * * \/etc\/init.d\/smb restart<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b9e\u4f8b8\uff1a\u6bcf\u5468\u516d\u3001\u5468\u65e5\u76841 : 10\u91cd\u542fsmb<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">10 1 * * 6,0 \/etc\/init.d\/smb restart<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b9e\u4f8b9\uff1a\u6bcf\u592918 : 00\u81f323 : 00\u4e4b\u95f4\u6bcf\u969430\u5206\u949f\u91cd\u542fsmb<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">0,30 18-23 * * * \/etc\/init.d\/smb restart<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b9e\u4f8b10\uff1a\u6bcf\u661f\u671f\u516d\u7684\u665a\u4e0a11 : 00 pm\u91cd\u542fsmb<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">0 23 * * 6 \/etc\/init.d\/smb restart<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b9e\u4f8b11\uff1a\u6bcf\u4e00\u5c0f\u65f6\u91cd\u542fsmb<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">* *\/1 * * * \/etc\/init.d\/smb restart<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b9e\u4f8b12\uff1a\u665a\u4e0a11\u70b9\u5230\u65e9\u4e0a7\u70b9\u4e4b\u95f4\uff0c\u6bcf\u9694\u4e00\u5c0f\u65f6\u91cd\u542fsmb<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">* 23-7\/1 * * * \/etc\/init.d\/smb restart\n1\uff09service&nbsp;cron&nbsp;start&nbsp;&nbsp;\/*\u542f\u52a8\u670d\u52a1*\/\n2\uff09service&nbsp;cron&nbsp;stop \/*\u5173\u95ed\u670d\u52a1*\/\n3\uff09service cron restart \/*\u91cd\u542f\u670d\u52a1*\/\n4\uff09service cron reload \/*\u91cd\u65b0\u8f7d\u5165\u914d\u7f6e*\/\n\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770bcron\u662f\u5426\u5728\u8fd0\u884c\uff08\u5982\u679c\u5728\u8fd0\u884c\uff0c\u5219\u4f1a\u8fd4\u56de\u4e00\u4e2a\u8fdb\u7a0bID\uff09\uff1a\n# pgrep cron\n\n<img decoding=\"async\" class=\"\" data-original=\"\/\/upload-images.jianshu.io\/upload_images\/311426-4ab2bdd33b5d2be6.png?imageMogr2\/auto-orient\/strip|imageView2\/2\/w\/716\/format\/webp\" src=\"https:\/\/byy3.com\/wp-content\/themes\/MNews%20V2.4\/images\/post-loading.gif\" title=\"linux ubuntu \u6dfb\u52a0crontab\u8ba1\u5212\u4efb\u52a1\u63d2\u56fe\" alt=\"linux ubuntu \u6dfb\u52a0crontab\u8ba1\u5212\u4efb\u52a1\u63d2\u56fe\" \/>\n\n*** 1\u5b89\u88c5cron 2\u6dfb\u52a0\u4efb\u52a1 3\u91cd\u542f\u4efb\u52a1 4\u67e5\u770b\u4efb\u52a1pgrep cron \u5982\u56fe\u663e\u793a \ncrontab\u6bcf\u5c0f\u65f6\u8fd0\u884c\u4e00\u6b21\uff08\u8f6c\uff09\n\u5148\u7ed9\u51facrontab\u7684\u8bed\u6cd5\u683c\u5f0f\n<img decoding=\"async\" data-original=\"https:\/\/images2018.cnblogs.com\/blog\/733392\/201805\/733392-20180530112549735-793099971.png\" src=\"https:\/\/byy3.com\/wp-content\/themes\/MNews%20V2.4\/images\/post-loading.gif\" title=\"linux ubuntu \u6dfb\u52a0crontab\u8ba1\u5212\u4efb\u52a1\u63d2\u56fe1\" alt=\"linux ubuntu \u6dfb\u52a0crontab\u8ba1\u5212\u4efb\u52a1\u63d2\u56fe1\" \/>\n&nbsp;\n\u5bf9\u4e8e\u7f51\u4e0a\u5f88\u591a\u7ed9\u51fa\u7684\u6bcf\u5c0f\u65f6\u5b9a\u65f6\u4efb\u52a1\u5199\u6cd5\uff0c\u53ef\u4ee5\u8bf4\u7edd\u5927\u591a\u6570\u90fd\u662f\u9519\u8bef\u7684\uff01\u6bd4\u5982\u5bf9\u4e8e\u4e0b\u9762\u7684\u8fd9\u79cd\u5199\u6cd5\uff1a\n00 * * * * #\u6bcf\u9694\u4e00\u5c0f\u65f6\u6267\u884c\u4e00\u6b21 00 *\/1 * * * #\u4e0e\u4e0a\u9762\u662f\u76f8\u540c\u7684\u4efb\u52a1\n\u8fd9\u79cd\u662f\u6b63\u786e\u7684\u5417\uff1f\u5bf9\u7167\u6700\u524d\u9762\u7ed9\u51fa\u7684\u8bed\u6cd5\u683c\u5f0f\u6765\u770b\uff0c\u8fd9\u4e2a\u5b9a\u65f6\u4efb\u52a1\u57280\u5206\u3001\u6bcf\u5c0f\u65f6\u3001\u6bcf\u5929\u3001\u6bcf\u6708\u3001\u6bcf\u661f\u671f\u6267\u884c\uff0c\u770b\u8d77\u6765\u4f3c\u4e4e\u5f88\u5408\u7406\u554a\uff1f\u524d\u4e00\u4e2a\u5c0f\u65f6\u76840\u5206\u548c\u540e\u4e00\u4e2a\u5c0f\u65f6\u76840\u5206\u4e0d\u5c31\u662f\u76f8\u9694\u4e00\u4e2a\u5c0f\u65f6\u5417\uff1f\u8fd9\u6837\u7684\u8bdd\u4e0d\u5c31\u662f\u6bcf\u9694\u4e00\u4e2a\u5c0f\u65f6\u6267\u884c\u5417\uff1f\u518d\u4ed4\u7ec6\u770b\u770b\uff0c\u597d\u50cf\u6709\u70b9\u4e0d\u5bf9\u52b2\uff0c\u4e3a\u4ec0\u4e48\u662f\u6bcf\u5c0f\u65f6\u76840\u5206\uff1f\u5982\u679c\u6211\u572811:55\u521b\u5efa\u4e86\u5b9a\u65f6\u4efb\u52a1\uff0c\u5e0c\u671b\u6bcf\u5c0f\u65f6\u6267\u884c\u4e00\u6b21\uff0c\u90a3\u4e48\u63a5\u4e0b\u6765\u8fd9\u4e2a\u5b9a\u65f6\u4efb\u52a1\u662f\u572812:55\u6267\u884c\uff0c\u8fd8\u662f\u572812:00\u6267\u884c\uff1f\u5f88\u663e\u7136\uff0c\u5b83\u662f\u6bcf\u5c0f\u65f6\u76840\u5206\u6267\u884c\uff0c\u4e5f\u5c31\u662f\u572812:00\u6267\u884c\u3002\n\u4f3c\u4e4e\u6ca1\u533a\u522b\uff1f\u90a3\u4e48\u8bf7\u601d\u8003\u4e0b\uff0c\u6bcf\u96943\u5c0f\u65f6\u6267\u884c\u5982\u4f55\u5199\uff1f\n\u7f51\u4e0a\u7ed9\u51fa\u7684\u5199\u6cd5\u5982\u4e0b\uff1a\n0 *\/3 * * * #\u9519\u8bef\u7684\u6bcf\u96943\u5c0f\u65f6\u6267\u884c\u4e00\u6b21\u5199\u6cd5\n\u8fd9\u79cd\u4e5f\u662f\u9519\u8bef\u7684\u5199\u6cd5\uff0c\u8fd9\u79cd\u80fd\u5145\u5206\u5c55\u793a\u524d\u9762\u4e00\u5c0f\u65f6\u6267\u884c\u4e00\u6b21\u5e26\u6765\u7684\u8ff7\u60d1\u611f\uff0c\u8fd9\u79cd\u5199\u6cd5\u5176\u5b9e\u662f\u6bcf\u65743\u5c0f\u65f6\u76840\u5206\u6267\u884c\u4e00\u6b21\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u5b83\u4f1a\u5728\u6bcf\u5929\u76843\u70b9\u30019\u70b9\u300112\u70b9...\u7b493\u7684\u6574\u6570\u500d\u65f6\u95f4\u70b9\u6765\u6267\u884c\uff0c\u5e76\u4e0d\u662f\u771f\u6b63\u610f\u4e49\u4e0a\u6bcf\u96943\u4e2a\u5c0f\u65f6\u6267\u884c\uff0c\u5982\u540c\u524d\u9762\u7c7b\u4f3c\uff0c\u5982\u679c\u4f60\u572811:56\u521b\u5efa\u8fd9\u79cd\u6bcf3\u5c0f\u65f6\u7684\u5b9a\u65f6\u4efb\u52a1\uff0c\u90a3\u4e48\u5b83\u4f1a\u572812\u70b9\u5c31\u5f00\u59cb\u6267\u884c\uff0c\u800c\u4e0d\u662f14:56\u6267\u884c\u3002\u8bf7\u770b\u5982\u4e0b\u9a8c\u8bc1\uff1a\n11:56\u5206\u521b\u5efa\u4e0a\u9762\u6240\u8c13\u7684\u201c\u6bcf3\u5c0f\u65f6\u6267\u884c\u4e00\u6b21\u201d\u7684\u5b9a\u65f6\u4efb\u52a1\uff1a\n<img decoding=\"async\" src=\"https:\/\/images2018.cnblogs.com\/blog\/733392\/201805\/733392-20180530124610585-836105770.png\" title=\"linux ubuntu \u6dfb\u52a0crontab\u8ba1\u5212\u4efb\u52a1\u63d2\u56fe2\" alt=\"linux ubuntu \u6dfb\u52a0crontab\u8ba1\u5212\u4efb\u52a1\u63d2\u56fe2\" \/><img decoding=\"async\" data-original=\"https:\/\/images2018.cnblogs.com\/blog\/733392\/201805\/733392-20180530124645238-2080567649.png\" src=\"https:\/\/byy3.com\/wp-content\/themes\/MNews%20V2.4\/images\/post-loading.gif\" title=\"linux ubuntu \u6dfb\u52a0crontab\u8ba1\u5212\u4efb\u52a1\u63d2\u56fe3\" alt=\"linux ubuntu \u6dfb\u52a0crontab\u8ba1\u5212\u4efb\u52a1\u63d2\u56fe3\" \/>\n&nbsp;\n4\u5206\u949f\u540e\u800c\u4e0d\u662f3\u5c0f\u65f6\u540e\uff0ccrontab\u6267\u884c\u4e86\u8be5\u5b9a\u65f6\u4efb\u52a1\uff1a\n<img decoding=\"async\" src=\"https:\/\/images2018.cnblogs.com\/blog\/733392\/201805\/733392-20180530124817837-1520009641.png\" title=\"linux ubuntu \u6dfb\u52a0crontab\u8ba1\u5212\u4efb\u52a1\u63d2\u56fe4\" alt=\"linux ubuntu \u6dfb\u52a0crontab\u8ba1\u5212\u4efb\u52a1\u63d2\u56fe4\" \/><img decoding=\"async\" data-original=\"https:\/\/images2018.cnblogs.com\/blog\/733392\/201805\/733392-20180530124846792-2051023738.png\" src=\"https:\/\/byy3.com\/wp-content\/themes\/MNews%20V2.4\/images\/post-loading.gif\" title=\"linux ubuntu \u6dfb\u52a0crontab\u8ba1\u5212\u4efb\u52a1\u63d2\u56fe5\" alt=\"linux ubuntu \u6dfb\u52a0crontab\u8ba1\u5212\u4efb\u52a1\u63d2\u56fe5\" \/>\n&nbsp;\n\u4e8b\u5b9e\u4e0a\uff0c\u5bf9\u4e8e\u8fd9\u79cd \"0 *\/3 * * * \" \u8fd9\u79cd\u5206\u949f\u65f6\u95f4\u70b9\u56fa\u5b9a\uff0c\u5c0f\u65f6\u6309\u6bcf\u5c0f\u65f6\u6216\u8005\u6bcf3\u5c0f\u65f6\u7684\u5199\u6cd5\uff0c\u90fd\u662f\u4ece1\u70b9\u5f00\u59cb\u7b97\u500d\u6570\uff0c\u6bd4\u5982\u6bcf\u4e00\u5c0f\u65f6\u5c31\u662f1\u70b9\u30012\u70b9\u30013\u70b9\uff0c\u800c\u6bcf2\u5c0f\u65f6\u5c31\u662f2\u70b9\u30014\u70b9\u30016\u70b9\uff0c\u6bcf3\u5c0f\u65f6\u5c31\u662f3\u70b9\u30016\u70b9\u30019\u70b9\u7b49\u7b49\uff0c\u4ee5\u6b64\u7c7b\u63a8\u3002\n\u9664\u6b64\u4e4b\u5916\uff0c\u7f51\u4e0a\u8fd8\u6709\u4eba\u7ed9\u51fa\u8fd9\u79cd\u7684\u6bcf\u5c0f\u65f6\u6267\u884c\u4e00\u6b21\u7684\u5b9a\u65f6\u4efb\u52a1\u5199\u6cd5\uff1a\n* *\/1 * * * #\u9519\u8bef\u7684\u6bcf\u9694\u4e00\u5c0f\u65f6\u6267\u884c\u4e00\u6b21\uff0c\u4e8b\u5b9e\u4e0a\u6bcf\u5206\u949f\u6267\u884c\u4e00\u6b21\n\u8fd9\u79cd\u6bd4\u524d\u9762\u90a3\u79cd\u8fd8\u4e0d\u5982\uff0c\u5b83\u538b\u6839\u4e0d\u662f\u6bcf\u5c0f\u65f6\u6267\u884c\uff0c\u800c\u662f\u6bcf\u5206\u949f\u6267\u884c\uff01\u4e3a\u4ec0\u4e48\uff1f\u56e0\u4e3a\u5206\u949f\u8981\u6c42\u7684\u662f\u6bcf\u5206\u949f\u6267\u884c\uff0c\u800c\u5c0f\u65f6\u5374\u8981\u6c42\u6bcf\u4e00\u4e2a\u5c0f\u65f6\u6267\u884c\uff0c\u8fd92\u4e2a\u5206\u660e\u662f\u51b2\u7a81\u7684\u65f6\u95f4\u7b56\u7565\u3002\u6700\u7ec8\u4ee5\u5206\u949f\u4e3a\u51c6\uff0c\u6240\u4ee5\u5b83\u662f\u6bcf\u5206\u949f\u6267\u884c\u4e00\u6b21\u3002\n&nbsp;\n<code>\u771f\u6b63\u7684\u6bcf\u9694\u4e00\u5c0f\u65f6\u3001\u6bcf\u9694105\u5206\u949f\u6267\u884c\u7684\u5b9a\u65f6\u4efb\u52a1\u5e94\u8be5\u5982\u4f55\u5199\u5462\uff1f\u5982\u4e0b\uff1a<\/code>\n*\/60 * * * * #\u6bcf60\u5206\u949f\u5373\u6bcf\u5c0f\u65f6\u6267\u884c\u4e00\u6b21 *\/105 * * * * #\u6bcf105\u5206\u949f\u6267\u884c\u4e00\u6b21 \n\u4e0b\u9762\u7684\u4f8b\u5b50\uff0c\u521b\u5efa\u4e00\u4e2acron\u4f5c\u4e1a\uff0c\u5b83\u6bcf\u5206\u949f\u8f93\u51fa\u6587\u672c\u201ctest crontab is work or not\u201d\u5e76\u628a\u6587\u672c\u4fdd\u5b58\u5230\/var\/www\/html\/testcrontab.txt\u3002\n\u6216\u8005\/root\/testcron.txt\n\u547d\u4ee4\n* * * * echo \"test crontab is work or not\" &gt;&gt; \/root\/testcron.txt\n\u5199\u5165\u4ee5\u4e0b\u7684\u811a\u672c\uff0c\u4fdd\u5b58\u9000\u51fa\uff0c\u4e00\u65e6\u4fdd\u5b58\u4e86\u6b64cron\u811a\u672c\u6587\u4ef6\uff0c\u5c31\u53ef\u4ee5\u628avar\u5b83\u6dfb\u52a0\u5230\u8ba1\u5212\u7684\u4f5c\u4e1a\u4e2d\u3002\n* * * * echo \"test crontab is work or not\" &gt;&gt; \/var\/www\/html\/testcrontab.txt\n<img decoding=\"async\" class=\"wp-image-306\" style=\"width: 150px;\" data-original=\"https:\/\/byy3.com\/wp-content\/uploads\/2020\/07\/20190523112859610.png\" src=\"https:\/\/byy3.com\/wp-content\/themes\/MNews%20V2.4\/images\/post-loading.gif\" title=\"linux ubuntu \u6dfb\u52a0crontab\u8ba1\u5212\u4efb\u52a1\u63d2\u56fe6\" alt=\"linux ubuntu \u6dfb\u52a0crontab\u8ba1\u5212\u4efb\u52a1\u63d2\u56fe6\" \/>\nCron\u8868\u8fbe\u5f0f\u8be6\u89e3\u53ef\u53c2\u8003\n\u8fd0\u884c\u7ed3\u679c\uff1a\n<img decoding=\"async\" class=\"wp-image-305\" style=\"width: 150px;\" data-original=\"https:\/\/byy3.com\/wp-content\/uploads\/2020\/07\/20190523113807304.png\" src=\"https:\/\/byy3.com\/wp-content\/themes\/MNews%20V2.4\/images\/post-loading.gif\" title=\"linux ubuntu \u6dfb\u52a0crontab\u8ba1\u5212\u4efb\u52a1\u63d2\u56fe7\" alt=\"linux ubuntu \u6dfb\u52a0crontab\u8ba1\u5212\u4efb\u52a1\u63d2\u56fe7\" \/>\n\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014 <\/pre>\n","protected":false},"excerpt":{"rendered":"<p>sudo apt-get install cron \u5b89\u88c5crontab \u7136\u540e\u6dfb\u52a0\u4efb\u52a1# crontab -e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,20],"tags":[353,352],"class_list":["post-298","post","type-post","status-publish","format-standard","hentry","category-linux","category-python","tag-linux","tag-python"],"_links":{"self":[{"href":"https:\/\/byy3.com\/index.php?rest_route=\/wp\/v2\/posts\/298","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/byy3.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/byy3.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/byy3.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/byy3.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=298"}],"version-history":[{"count":0,"href":"https:\/\/byy3.com\/index.php?rest_route=\/wp\/v2\/posts\/298\/revisions"}],"wp:attachment":[{"href":"https:\/\/byy3.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/byy3.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/byy3.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}