本文介绍了Laravel 5.3 Schedule不能正常工作(没有计划的命令可以运行.)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下是计划功能
protected function schedule(Schedule $schedule) { $schedule->command('queue:work') ->everyMinute() ->withoutOverlapping(); }下面是laravel的时间表
Below is the cron for laravel
* * * * * /usr/local/bin/php /home/space/public_html/project/artisan schedule:run >> /home/space/public_html/project/public/op.txt 2>&1但是每次cron输出
No scheduled commands are ready to run.队列:工作未执行,我在做什么错?
queue:work is not getting executed, what am I doing wrong?
推荐答案删除存储/框架中的所有计划文件即可完成这项工作.
Deleting all the schedule files in storage/framework did this job.
问题在于该命令已执行,但出现了一些错误,因此从未执行过,但该命令处于活动状态,阻止cron再次运行该命令(因为我使用了withoutOverlapping()).
The problem was the command was executed but was some error so never worked but the command was active preventing it to run again by the cron (because i used withoutOverlapping() ).
更多推荐
Laravel 5.3 Schedule不能正常工作(没有计划的命令可以运行.)
发布评论