setName('close-room-visitor') ->setDescription('定时更新到期游客记录'); // } /** * 清理过期装扮 * @param Input $input * @param Output $output * @return int|void|null * @throws \think\Exception * @throws \think\exception\PDOException */ protected function execute(Input $input, Output $output) { while (true) { sleep(1); $tid = input('tid', 0); $is_reset = input('is_reset', 0); $reslut = model('api/RoomVisitor')->close_room_visitor(); echo '定时更新到期游客记录!'.PHP_EOL; } } }