为什么工匠的时间表忽略了“没有击球”
在我的Laravel内核中,我具有以下时间表功能:
$schedule->command('import:currencyrate')->everyMinute()->withoutOverlapping(1)->emailOutputOnFailure('[email protected]');
$schedule->command('import:token_data')->everyFiveMinutes()->withoutOverlapping(1)->emailOutputOnFailure('[email protected]');
$schedule->command('import:nft_data')->everyTenMinutes()->withoutOverlapping(1);
这通常在去年没有任何问题。但是在过去的几天中,由于未完成的任务,我的服务器每天崩溃1-2次。重叠:
这是怎么可能的?我不用击球,难道不应该停止同一任务多次运行吗?
In my Laravel Kernel I have the following schedule function:
$schedule->command('import:currencyrate')->everyMinute()->withoutOverlapping(1)->emailOutputOnFailure('[email protected]');
$schedule->command('import:token_data')->everyFiveMinutes()->withoutOverlapping(1)->emailOutputOnFailure('[email protected]');
$schedule->command('import:nft_data')->everyTenMinutes()->withoutOverlapping(1);
This usually works without any issues for the last year. But for the last few days, my server crashes 1-2 times a day, due to tasks that don't complete & overlap:
How is this possible? I use withoutOverlapping, shouldn't that stop the same task to run multiple times?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您已经写了
- >没有击球(1)
,这意味着锁定时间1分钟后,您的任务将再次运行。 单击此处查看Laravel文档。尝试- > nonOOverLapping()
并检查。you have written
->withoutOverlapping(1)
that means after 1 min of lock time your task will run again. Click here to see the laravel documentation. Try->withoutOverlapping()
and check.