{"id":49173,"date":"2020-03-10T13:49:51","date_gmt":"2020-03-10T05:49:51","guid":{"rendered":"http:\/\/4563.org\/?p=49173"},"modified":"2020-03-10T13:49:51","modified_gmt":"2020-03-10T05:49:51","slug":"%e3%80%90%e4%b8%8d%e6%87%82%e5%b0%b1%e9%97%ae%e3%80%91crontab-%e5%ae%9a%e6%97%b6%e4%bb%bb%e5%8a%a1","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=49173","title":{"rendered":"\u3010\u4e0d\u61c2\u5c31\u95ee\u3011Crontab \u5b9a\u65f6\u4efb\u52a1"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>6fyC8r<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 13&nbsp;\u5206\u949f\u524d\t<\/p>\n<h3>\u3010\u4e0d\u61c2\u5c31\u95ee\u3011Crontab \u5b9a\u65f6\u4efb\u52a1<\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 6fyC8r \u4e8e 2020-3-10 14:04 \u7f16\u8f91 <\/p>\n<p> \u7f51\u4e0a\u641c\u4e86\u4e00\u4e0b\uff0c\u770b\u4e0d\u61c2\uff0c\/bin\/date &gt;&gt;\/tmp\/date.txt\u610f\u601d\u662f\u628a\u65e5\u5fd7\u751f\u6210\u5230\/tmp\/date.txt\uff1f<\/p>\n<p>  * * * * * \/bin\/date &gt;&gt;\/tmp\/date.txt<br \/>  * * * * * sleep 10; \/bin\/date &gt;&gt;\/tmp\/date.txt<br \/>  * * * * * sleep 20; \/bin\/date &gt;&gt;\/tmp\/date.txt<br \/>  * * * * * sleep 30; \/bin\/date &gt;&gt;\/tmp\/date.txt<br \/>  * * * * * sleep 40; \/bin\/date &gt;&gt;\/tmp\/date.txt<br \/>  * * * * * sleep 50; \/bin\/date &gt;&gt;\/tmp\/date.txt<\/p>\n<p>  \u7a0b\u5e8f\uff1a\/root\/test.py<br \/>  \u8fd9\u662f\u6bcf\u5206\u949f\u6267\u884c\u4e00\u6b21\uff0c\u6211\u60f3\u6bcf10\u79d2\u6267\u884c\u4e00\u6b21\uff0c\u751f\u6210\u65e5\u5fd7\u5230\/root\/testpy_log.txt \u8be5\u600e\u4e48\u5199\uff1f<br \/>  * * * * * python3 \/root\/test.py<br \/>  \u5927\u4f6c\u4eec<br \/>  \u6211\u8fd9\u6837\u5199\u7684\u5bf9\u4e0d\uff1f<\/p>\n<p>  * * * * * sleep 10; python3 \/root\/test.py &gt;&gt;\/root\/testpy_log.txt<br \/>  * * * * * sleep 20; python3 \/root\/test.py &gt;&gt;\/root\/testpy_log.txt<br \/>  * * * * * sleep 30; python3 \/root\/test.py &gt;&gt;\/root\/testpy_log.txt<br \/>  * * * * * sleep 40; python3 \/root\/test.py &gt;&gt;\/root\/testpy_log.txt<br \/>  * * * * * sleep 50; python3 \/root\/test.py &gt;&gt;\/root\/testpy_log.txt<\/p>\n<p>  \t\t\t\t\t<strong>hasamol7468<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 11&nbsp;\u5206\u949f\u524d\t<\/p>\n<h3><\/h3>\n<p>  \t\t\/bin\/date &gt;&gt;\/tmp\/date.txt\u662f\u5728date.txt\u5c3e\u90e8\u52a0\u5165\u5f53\u524d\u7684\u65e5\u671f<br \/>  \u8bb0\u5f97\u4ee5\u524d\u6298\u817e\u7684\u65f6\u5019Crontab\u672c\u8eab\u597d\u50cf\u65e0\u6cd5\u8fdb\u884c\u79d2\u7ea7\u7684\u4efb\u52a1 \u662f\u9760sleep\u8fdb\u884c\u7684\u79d2\u7ea7\u4efb\u52a1<br \/>  \u5177\u4f53\u5fd8\u8bb0\u4e86 \u5b9d\u5854\u771f\u9999\u3002\u3002\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>h2o<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 10&nbsp;\u5206\u949f\u524d\t<\/p>\n<h3><\/h3>\n<p>  \t\t1\u3001\u6700\u5c0f\u7c92\u5ea6\u662f\u5206\u949f<br \/>  2\u3001crontab\u91cc\u6ca1\u6709$PATH\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>cherbim<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 10&nbsp;\u5206\u949f\u524d\t<\/p>\n<h3><\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 cherbim \u4e8e 2020-3-10 14:02 \u7f16\u8f91 <\/p>\n<p> \u88c5\u4e2a\u5b9d\u5854\uff0c\u8ba1\u5212\u4efb\u52a1\uff0c\u7ed9\u4f60\u754c\u9762\u5316\u4f53\u9a8c<br \/>  crontab\u6ca1\u6709\u79d2\uff0c\u53ea\u6709\u5206\u949f\uff0c\u4f60\u53ef\u4ee5\u8bbe\u7f6e\u591a\u4e2a\u4e2a\u4efb\u52a1\uff0c\u7b2c\u4e00\u4e2a\u4e0d\u7761\u7720\uff0c\u7b2c\u4e8c\u4e2a\u7761\u772010\u79d2\uff0c\u7b2c\u4e09\u4e2a\u7761\u772020\u79d2\u3002\u3002\u3002\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>6fyC8r<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 4&nbsp;\u5206\u949f\u524d\t<\/p>\n<h3><\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 6fyC8r \u4e8e 2020-3-10 14:08 \u7f16\u8f91 <\/p>\n<p> cherbim \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-3-10 14:00<br \/>  \u88c5\u4e2a\u5b9d\u5854\uff0c\u8ba1\u5212\u4efb\u52a1\uff0c\u7ed9\u4f60\u754c\u9762\u5316\u4f53\u9a8c<br \/>  crontab\u6ca1\u6709\u79d2\uff0c\u53ea\u6709\u5206\u949f\uff0c\u4f60\u53ef\u4ee5\u8bbe\u7f6e\u591a\u4e2a\u4e2a\u4efb\u52a1\uff0c\u7b2c\u4e00\u4e2a\u4e0d\u7761\u7720\uff0c\u7b2c\u4e8c &#8230;<\/p>\n<p>  \u5927\u4f6c\u662f\u8fd9\u6837\u5199\u5bf9\u5417\uff1f\u5b9d\u5854\u5bf9\u6211\u6ca1\u9700\u6c42\u554a\uff0c\u4e3a\u4e86\u641e\u4e86\u5b9a\u65f6\u88c5\u4e2a\u5b9d\u5854\u6709\u70b9\u6d6a\u8d39\u4e86\uff0c:lol <\/p>\n<p>  * * * * * python3 \/root\/test.py &gt;&gt;\/root\/testpy_log.txt<br \/>  * * * * * sleep 10; python3 \/root\/test.py &gt;&gt;\/root\/testpy_log.txt<br \/>  * * * * * sleep 20; python3 \/root\/test.py &gt;&gt;\/root\/testpy_log.txt<br \/>  * * * * * sleep 30; python3 \/root\/test.py &gt;&gt;\/root\/testpy_log.txt<br \/>  * * * * * sleep 40; python3 \/root\/test.py &gt;&gt;\/root\/testpy_log.txt<br \/>  * * * * * sleep 50; python3 \/root\/test.py &gt;&gt;\/root\/testpy_log.txt<\/p>\n","protected":false},"excerpt":{"rendered":"<p>6fyC8r \u5927\u4f6c\u6709\u8bdd\u8bf4 : 13&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/49173"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=49173"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/49173\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=49173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=49173"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=49173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}