Laravel 5.3 Schedule不能正常工作(没有计划的命令可以运行.)

编程入门 行业动态 更新时间:2024-10-27 08:32:04
本文介绍了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不能正常工作(没有计划的命令可以运行.)

本文发布于:2023-11-24 04:08:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1623911.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不能正常   命令   计划   工作   Laravel

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!