#### 问题描述
需要3秒请求一次 API接口,不管3秒内是否请求到,必须在上一次请求的3秒后再次发出请求。'/vendor/autoload.php';
//发送请求
function request($http)
{
$http->request('https://www.workerman.netexception) {
echo $exception;
}
]);
}
$task = new Worker();
// 开启多少个进程运行定时任务,注意业务是否在多进程有并发问题
$task->count = 1;
$task->onWorkerStart = function(Worker $task)
{
$http = new Workerman