{"id":84817,"date":"2020-05-12T18:10:04","date_gmt":"2020-05-12T10:10:04","guid":{"rendered":"http:\/\/4563.org\/?p=84817"},"modified":"2020-05-16T16:58:55","modified_gmt":"2020-05-16T08:58:55","slug":"crontab-%e8%bf%90%e8%a1%8c-flask-%e7%9a%84%e4%b8%80%e4%b8%aa-app-%e6%80%bb%e6%98%af%e6%89%a7%e8%a1%8c%e4%b8%8d%e6%88%90%e5%8a%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=84817","title":{"rendered":"crontab \u8fd0\u884c flask \u7684\u4e00\u4e2a app \u603b\u662f\u6267\u884c\u4e0d\u6210\u529f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  crontab \u8fd0\u884c flask \u7684\u4e00\u4e2a app \u603b\u662f\u6267\u884c\u4e0d\u6210\u529f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : cuixiao603 <\/span>  <span><i><\/i> 3<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>crontab \u8fd0\u884c\u4e00\u4e2a\u68c0\u6d4b\u811a\u672c\u5c31\u662f app \u6302\u4e86\u6267\u884c\uff1anohup \/usr\/bin\/python3 \/app\/app.py &gt; \/log\/app.log &amp; \u6267\u884c\u5b8c\u6210\u540e\u8fdb\u7a0b\u662f\u8d77\u6765\u4e86\u7684\uff0c\u4f46\u662f\u8bbf\u95ee\u63a5\u53e3\u62a5 500 \u9519\u8bef\uff0c \u67e5\u770b\u8f93\u51fa\u65e5\u5fd7\u4e4b\u540e\u53d1\u73b0\uff1a<\/p>\n<pre><code> * Serving Flask app \"app\" (lazy loading)  * Environment: production    WARNING: This is a development server. Do not use it in a production deployment.    Use a production WSGI server instead.  * Debug mode: off <\/code><\/pre>\n<p>\u76f8\u6bd4\u6b63\u5e38\u6267\u884c\u5c11\u4e86\u6700\u540e\u90a3\u4e00\u884c<\/p>\n<pre><code> * Serving Flask app \"app\" (lazy loading)  * Environment: production    WARNING: This is a development server. Do not use it in a production deployment.    Use a production WSGI server instead.  * Debug mode: off  * Running on http:\/\/0.0.0.0:5200\/ (Press CTRL+C to quit)  <\/code><\/pre>\n<p>\u5404\u4f4d\u5927\u4f6c\u80fd\u51ed\u4e30\u5bcc\u7684\u7ecf\u9a8c\u5b9a\u4f4d\u51fa\u662f\u54ea\u91cc\u95ee\u9898\u5417<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>8<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1519285\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Kilerd <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8bf4\u4e86\u591a\u5c11\u6b21\uff0cFlask \u5185\u7f6e\u7684\u670d\u52a1\u5668\u4e0d\u80fd\u4f5c\u4e3a\u751f\u4ea7\u670d\u52a1\u5668\u4f7f\u7528\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1519286\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : cuixiao603 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Kilerd #1 <img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/05\/9kZ3y873-6.png\" alt=\"crontab \u8fd0\u884c flask \u7684\u4e00\u4e2a app \u603b\u662f\u6267\u884c\u4e0d\u6210\u529f\"> \u5927\u4f6c\u4e5f\u4e0d\u8981\u6fc0\u52a8\uff0c\u90a3\u6211\u8fd9\u4e2a\u95ee\u9898\u8ddf\u4f7f\u7528 flask \u5185\u7f6e\u670d\u52a1\u5668\u6709\u5173\u5417                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1519287\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Caratpine <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5f00\u542f debug \u6a21\u5f0f\uff0c\u7136\u540e\u518d\u7528 crontab \u8fd0\u884c\uff0c\u770b\u4e00\u4e0b\u62a5\u9519\u65e5\u5fd7\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1519288\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : est <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u56e0\u4e3a\u7aef\u53e3\u88ab\u5360\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1519289\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : frostming <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u628a\u9519\u8bef\u8f93\u51fa\u4e5f\u91cd\u5b9a\u5411\u4e00\u4e0b\u554a\uff0c\u9519\u8bef\u90fd\u4e22\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1519290\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : razrlele <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             nohup \/usr\/bin\/python3 \/app\/app.py &amp;&gt; \/log\/app.log &amp; <\/p>\n<p>\u9171\u7d2b\u5c31\u53ef\u4ee5\u628a stderr \u4e5f\u6253\u51fa\u6765\u4e86                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1519291\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : cuixiao603 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @frostming #5 <br \/>@razrlele #6 <br \/>\u8c22\u8c22\u6307\u70b9\u554a\uff0c\u628a\u9519\u8bef\u65e5\u5fd7\u8f93\u51fa\u540e\u53d1\u73b0\u662f\u4ee3\u7801\u67d0\u4e00\u5904\u4f9d\u7136\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\u8bfb\u53d6\u6587\u4ef6\uff0c\u6539\u4e3a\u7edd\u5bf9\u8def\u5f84\u5c31 ok \u4e86\uff01\uff01                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1519292\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ashCloud <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5f00 debug mod \u53ef\u4ee5\u770b\u5230 error stack                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>crontab \u8fd0\u884c flask &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\/84817"}],"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=84817"}],"version-history":[{"count":1,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/84817\/revisions"}],"predecessor-version":[{"id":84819,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/84817\/revisions\/84819"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=84817"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=84817"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=84817"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}