update:更新定时任务配置和初始化数据

This commit is contained in:
JaguarJack
2020-09-16 10:14:27 +08:00
parent a98fbdc7a1
commit c72943da58
4 changed files with 266 additions and 66 deletions

View File

@@ -1,38 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2020 http://catchadmin.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
// +----------------------------------------------------------------------
// | Author: JaguarJack [ njphper@gmail.com ]
// +----------------------------------------------------------------------
namespace catcher\library;
use catcher\library\crontab\Schedule;
class ScheduleKernel
{
protected $schedule;
public function __construct()
{
$this->schedule = new Schedule();
}
protected function run()
{
$this->schedule->command('catch:cache')->everyThirtySeconds();
$this->schedule->command('test')->everyTenSeconds();
}
public function tasks()
{
$this->run();
return $this->schedule->getCronTask();
}
}