php - Laravel Scheduler 不运行命令,但可以手动运行

标签 php laravel schedule

我有这 3 个命令要按计划运行。

$schedule->command("update:branchsales")->everyFiveMinutes()->timezone('America/Sao_Paulo')->withoutOverlapping();
$schedule->command("update:billing")->everyFiveMinutes()->timezone('America/Sao_Paulo')->withoutOverlapping();
$schedule->command("update:sales")->everyFiveMinutes()->timezone('America/Sao_Paulo')->withoutOverlapping();
但是在日志中,我们可以看到其中只有 2 个在实际运行。
No scheduled commands are ready to run.
Running scheduled command: '/usr/local/bin/php' 'artisan' update:sales > '/dev/null' 2>&1
No scheduled commands are ready to run.
No scheduled commands are ready to run.
Running scheduled command: '/usr/local/bin/php' 'artisan' update:branchsales > '/dev/null' 2>&1
No scheduled commands are ready to run.
No scheduled commands are ready to run.
Running scheduled command: '/usr/local/bin/php' 'artisan' update:sales > '/dev/null' 2>&1
No scheduled commands are ready to run.
No scheduled commands are ready to run.
Running scheduled command: '/usr/local/bin/php' 'artisan' update:branchsales > '/dev/null' 2>&1
No scheduled commands are ready to run.
我可以运行 update:billing手动但它突然停止按计划运行。
所有这些都一直运行到昨天。
任何帮助将不胜感激。
编辑:update:sales现在也停了。
No scheduled commands are ready to run.
Running scheduled command: '/usr/local/bin/php' 'artisan' update:sales > '/dev/null' 2>&1
No scheduled commands are ready to run.
No scheduled commands are ready to run.
Running scheduled command: '/usr/local/bin/php' 'artisan' update:branchsales > '/dev/null' 2>&1
No scheduled commands are ready to run.
No scheduled commands are ready to run.
Running scheduled command: '/usr/local/bin/php' 'artisan' update:sales > '/dev/null' 2>&1
No scheduled commands are ready to run.
No scheduled commands are ready to run.
Running scheduled command: '/usr/local/bin/php' 'artisan' update:branchsales > '/dev/null' 2>&1
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
Running scheduled command: '/usr/local/bin/php' 'artisan' update:branchsales > '/dev/null' 2>&1
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
Running scheduled command: '/usr/local/bin/php' 'artisan' update:branchsales > '/dev/null' 2>&1

最佳答案

检查正在运行的进程,也许命令正在运行(卡住)并且由于 withoutOverlapping 而没有运行.

ps aux | grep 'php artisan'

关于php - Laravel Scheduler 不运行命令,但可以手动运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63393750/

相关文章:

php - 如何将此 Laravel PHP 代码简化为一个 Eloquent 查询?

php - 拉维尔 5 : No hint path defined for [Auth]

jenkins - 如何每 15 分钟安排一次 Jenkins 作业

php - mysql 到 msqli 的转换

javascript - 如何使用 php 或 javascript 将所有换行符和制表符替换为其各自的\x 代码?

php - 为什么我会从 CURL 随机收到 "Unknown SSL protocol error"?

php - 如何使用 laravel 将表单中的数据发布到数据库中?

php - 使用 HTML 创建时间表 - PHP - MySQL

mysql - 在火车时刻表 MYSQL 中存储日期

javascript - 通过 AJAX 接收 PHP 的响应