定时任务
<?php
use Hyperf\Contract\StdoutLoggerInterface;
use Hyperf\Nano\Factory\AppFactory;
require_once __DIR__ . '/vendor/autoload.php';
$app = AppFactory::create();
$app->addCrontab('* * * * * *', function(){
$this->get(StdoutLoggerInterface::class)->info('execute every second!');
});
$app->run();