调度频率并不支持秒级别

修改理由:
详细描述:
php artisan schedule:work
BadMethodCallException
Method Illuminate\Console\Scheduling\Event::everySecond does not exist.
at vendor/laravel/framework/src/Illuminate/Macroable/Traits/Macroable.php:113
109▕ */
110▕ public function __call($method, $parameters)
111▕ {
112▕ if (! static::hasMacro($method)) {
➜ 113▕ throw new BadMethodCallException(sprintf(
114▕ 'Method %s::%s does not exist.', static::class, $method
115▕ ));
116▕ }
117▕
i Bad Method Call: Did you mean Illuminate\Console\Scheduling\Event::everySixHours() ?
1 app/Console/Tasks/CrontabTask.php:30
Illuminate\Console\Scheduling\Event::__call("everySecond", [])
相关信息:
- 类型:文档文章
- 文章: 任务调度
- 文档: 《Laravel 10 中文文档(10.x)》
标题修改:
内容修改:
Old | New | Differences |
---|---|---|
105 | 105 | 方法 | 描述 |
106 | 106 | ------------- | ------------- |
107 | 107 | `->cron('* * * * *');` | 自定义 Cron 计划执行任务 |
108 | ||
109 | ||
110 | ||
111 | ||
112 | 108 | `->everyFifteenSeconds();` | 每15秒钟执行一次任务 |
113 | 109 | `->everyTwentySeconds();` | 每20秒钟执行一次任务 |
114 | 110 | `->everyThirtySeconds();` | 每30秒钟执行一次任务 |