Initial commit

This commit is contained in:
net909
2023-09-28 16:21:06 +08:00
parent 498772eb04
commit ba7be004c0
640 changed files with 87745 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
declare (strict_types = 1);
namespace app\command;
use think\console\Command;
use think\console\Input;
use think\console\input\Argument;
use think\console\input\Option;
use think\console\Output;
use think\facade\Db;
class Cron extends Command
{
protected function configure()
{
// 指令配置
$this->setName('cron')
->setDescription('定时数据清理任务');
}
protected function execute(Input $input, Output $output)
{
// 指令输出
Db::name('querycache')->where('uptime','<',date('Y-m-d H:i:s', strtotime('-30 days')))->delete();
$output->writeln('定时数据清理任务执行完毕');
}
}