在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
//计划任务定时检测master进程是否存在,不存在则启动,以root用户运行 public function checkMaster() { $cmd = 'ps axu|grep "UctDataWorker masterRun"|grep -v "grep"|wc -l'; $ret = shell_exec("$cmd"); $ret = rtrim($ret, "\r\n"); if($ret === "0") { $path = dirname(__FILE__) . '/index.php'; $php_path = Config::$php_path; $start_master_cmd = "nohup ".$php_path." ".$path." UctDataWorker masterRun >> /data/log/uctWorker.log 2>&1 &"; $ret = shell_exec("$start_master_cmd"); } }
|
2022-08-18
2022-08-15
2022-08-17
2022-11-06
2022-08-17
请发表评论