everyTenMinutes(); // $this->everyMinute(); } /** * 执行任务 * @return mixed */ protected function execute() { //任务下发 $task=TaskTask::where('id',487)->select()->toArray(); // foreach($task as $k=>$v){ // if(isset($v['extend']['terminus']['lnglat'])&& isset($v['extend']['transfer']['lnglat'])){ // $arr=$v['extend']['terminus']['lnglat']; // $a=app(RemoteController::class)->coordinate($params,$arr[0],$arr[1]); // $arr_two=$v['extend']['transfer']['lnglat']; // $b=app(RemoteController::class)->coordinate($params,$arr_two[0],$arr_two[1]); // if($a<500 && $b<500){ // TaskTask::where('id',$v['id'])->update(['status'=>3]); // } // } // } //...具体的任务执行 } }