初始化代码
This commit is contained in:
27
application/common/command/ClearUserCp.php
Normal file
27
application/common/command/ClearUserCp.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace app\common\command;
|
||||
|
||||
|
||||
use think\console\Command;
|
||||
use think\console\Input;
|
||||
use think\console\Output;
|
||||
|
||||
class ClearUserCp extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('clear-user-cp')
|
||||
->setDescription('清理过期cp关系');
|
||||
}
|
||||
|
||||
protected function execute(Input $input, Output $output)
|
||||
{
|
||||
while (true) {
|
||||
sleep(15);
|
||||
$reslut = model('admin/Decorate')->clear_user_cp();
|
||||
echo '清理cp成功!';
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user