From 2aab591490f56df8ce74dc22e43568ef4cceb7db Mon Sep 17 00:00:00 2001 From: vilson <545522390@qq.com> Date: Sat, 22 Feb 2020 10:30:35 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=87=83=E5=B0=BD=E5=9B=BE?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=95=B0=E6=8D=AE=E8=B0=83=E7=94=A8=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: vilson <545522390@qq.com> --- application/common/Plugins/GateWayWorker/config.php | 2 +- .../common/Plugins/GateWayWorker/crontab.php | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/application/common/Plugins/GateWayWorker/config.php b/application/common/Plugins/GateWayWorker/config.php index 79ce220..1db7544 100644 --- a/application/common/Plugins/GateWayWorker/config.php +++ b/application/common/Plugins/GateWayWorker/config.php @@ -8,4 +8,4 @@ define('USE_SSL', false);//是否使用ssl define('LOCAL_CERT', '/www/wwwroot/EasyProjectApi/server.pem');// 证书路径也可以是crt文件 define('LOCAL_PK', '/www/wwwroot/EasyProjectApi/server.key'); define('VERIFY_PEER', false); -define('ALLOW_SELF_SIGNED', true);//如果是自签名证书需要开启此选项 +define('ALLOW_SELF_SIGNED', false);//如果是自签名证书需要开启此选项 diff --git a/application/common/Plugins/GateWayWorker/crontab.php b/application/common/Plugins/GateWayWorker/crontab.php index b35e982..aefe32f 100644 --- a/application/common/Plugins/GateWayWorker/crontab.php +++ b/application/common/Plugins/GateWayWorker/crontab.php @@ -1,5 +1,6 @@ name = 'crontab'; $doneTicket = []; @@ -32,9 +34,14 @@ function checkTime() function setProjectReport() { - global $doneTicket; + global $client,$doneTicket; $doneTicket['setProjectReportDate'] = date('Y-m-d', time()); - exec("php think projectReport",$out); - echo $out[0]; + //命令行模式 +// exec("php think projectReport",$out); +// echo $out[0]; + + //http模式 + $res = $client->request('GET', SITE_URL . '/index.php/project/project/_setDayilyProejctReport'); + echo $res->getBody(); }