35 lines
723 B
PHP
35 lines
723 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
|
||
|
|
namespace app\common\command;
|
||
|
|
|
||
|
|
|
||
|
|
use think\console\Command;
|
||
|
|
use think\console\Input;
|
||
|
|
use think\console\Output;
|
||
|
|
|
||
|
|
class BjGrade extends Command
|
||
|
|
{
|
||
|
|
protected function configure()
|
||
|
|
{
|
||
|
|
$this->setName('bj-grade')
|
||
|
|
->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(10);
|
||
|
|
$reslut = model('api/UserNobility')->auto_nobility_grade();
|
||
|
|
echo '爵位保级!';
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|