我的场景
1.自定义命令行 任务定时器
2. workerman websocket服务
启动结果
php think worker:gateway 【启动成功】
php think crontab start 【启动失败】
此时 提示 Workerman[think] already running.
解决方式
在自定义命令中的 protected function execute 函数增加以下设置
Worker::$pidFile = app()->getRootPath().'MyCrontab.pid';
运行结果