Laravel 5.3 Schedule不能正常工作(没有计划的命令可以运行.) [英] Laravel 5.3 Schedule Not working ( No scheduled commands are ready to run. )

查看:78
本文介绍了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不能正常工作(没有计划的命令可以运行.)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆