新增定时切换解析功能

This commit is contained in:
net909
2025-08-22 21:25:42 +08:00
parent 9f529e2528
commit fd21a55d01
18 changed files with 1036 additions and 126 deletions
+3 -1
View File
@@ -15,6 +15,7 @@ use think\facade\Config;
use app\service\OptimizeService;
use app\service\CertTaskService;
use app\service\ExpireNoticeService;
use app\service\ScheduleService;
class Certtask extends Command
{
@@ -22,7 +23,7 @@ class Certtask extends Command
{
// 指令配置
$this->setName('certtask')
->setDescription('SSL证书续签与部署、域名到期提醒、CF优选IP更新');
->setDescription('SSL证书续签与部署、域名到期提醒、定时切换解析、CF优选IP更新');
}
protected function execute(Input $input, Output $output)
@@ -30,6 +31,7 @@ class Certtask extends Command
$res = Db::name('config')->cache('configs', 0)->column('value', 'key');
Config::set($res, 'sys');
(new ScheduleService())->execute();
$res = (new OptimizeService())->execute();
if (!$res) {
(new CertTaskService())->execute();