20 lines
474 B
PHP
20 lines
474 B
PHP
<?php
|
|
namespace app\event;
|
|
use app\cron\services\TimerService;
|
|
class SwooleCronCronTimer extends TimerService
|
|
{
|
|
|
|
/***
|
|
* 扫描系统任务
|
|
* @param $event
|
|
* @return void
|
|
*/
|
|
public function handle($event): void
|
|
{
|
|
$this->tick(1000 *10, function () {
|
|
file_put_contents(root_path() . 'runtime/.cron3.log', time());
|
|
$cron_model = new \app\model\system\Cron();
|
|
$cron_model->execute();
|
|
});
|
|
}
|
|
} |