为什么工匠的时间表忽略了“没有击球”

发布于 2025-01-28 10:08:10 字数 942 浏览 5 评论 0原文

在我的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:

enter image description here

How is this possible? I use withoutOverlapping, shouldn't that stop the same task to run multiple times?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

自我难过 2025-02-04 10:08:10

您已经写了- >没有击球(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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文