Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

MwSpaceLLC's avatar

No scheduled commands are ready to run | empty

  • Laravel Version: 5.7.25
  • PHP Version: 7.2.14
  • Database Driver & Version: MySQL 2ª gen. 5.7

Hi, Sorry for the trouble, I have this problem in creating a scheduled command.

Description:

In our crontab -e user we have inserted the following on Debian:

* * * * * cd /var/www/myfolder.com/ && php artisan schedule:run >> crontab.laravel

We have correctly entered the schedule function as follows:

app/console/kernel.php

  <?php

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;


class Kernel extends ConsoleKernel
{
    /**
     * The Artisan commands provided by your application.
     *
     * @var array
     */
    protected $commands = [
//        'App\Console\Commands\HelpCenter',
        Commands\HelpCenter::class
    ];

    /**
     * Define the application's command schedule.
     *
     * @param  \Illuminate\Console\Scheduling\Schedule $schedule
     * @return void
     */
    protected function schedule(Schedule $schedule)
    {
        $schedule->command('elena:help')->everyMinute();
    }

    /**
     * Register the commands for the application.
     *
     * @return void
     */
    protected function commands()
    {
        $this->load(__DIR__ . '/Commands');

        require base_path('routes/console.php');
    }

}

but the result continues to be No scheduled commands are ready to run we tried all the combinations impossible but nothing. If we uncomment the function Artisan call working, the script is executed

Try to force command crontab -e

To better understand where the problem lies We have added a crontab directly with the command without going through the schedule as :

* * * * * cd /var/www/myfolder.com/ && php artisan elena:help >> crontab.laravel

This command runs perfectly every minute so we can not figure out where the problem is. if you have the patience to give us some advice we will be happy. good day

0 likes
39 replies
Snapey's avatar

any difference if you just type php artisan schedule:run ?

1 like
OriOn's avatar

Is the command working at all? (if you run it via php artisan and the command's signature)

if so, what is the approximate execution time?

and is the storage/logs/laravel.log giving any clues where this could come from?

MwSpaceLLC's avatar

@ORION - All user can run the command and the time exec is 3/4 second in test.

In logs laravel not put any info in run.

Only same title.

I have added another command in crontab -e and work fine if I call them directly.

OriOn's avatar

what about a \ at the begining of the string?

protected function schedule(Schedule $schedule)
{
    $schedule->command('\App\Console\Commands\HelpCenter')->everyMinute();
}

or try to replace the string with the command's signature as you did for your second example (Artisan::call('elena:help');)

1 like
MwSpaceLLC's avatar

@ORION - I thank you for the answer but I have already tried all the configurations possible.... the result is still the same unfortunately

I have tried all laravel command method =(

OriOn's avatar

It's very strange indeed. Have you tried using composer dump-autoload to re-generate the list of all classes in your project?

MwSpaceLLC's avatar

@ORION - yes ... today we have tried everything but the problem is not the class,

we do not understand what the problem is because the same result brings it back even if we try to put the following:

protected function schedule(Schedule $schedule)
{
    $schedule->command('4tyb89tv4yb89vt4yb89')->everyMinute();
}

obviously it should tell us that there is no command, instead it keeps coming back:

###No scheduled commands are ready to run.

the class commented Artisan:: correctly loads the command while the Schedule class with the command, exec, call, etc function is not a sign of life. always returns the same thing

Snapey's avatar

well if schedule:run exhibits the same issue, you can forget all about cron

how about a dd() inside your schedule method?

1 like
OriOn's avatar

Last question because I'm running out of ideas here, Have you tried a different interval ? Like ->everyFiveMinutes()

MwSpaceLLC's avatar

@SNAPEY - I have already tried, the object is loaded correctly. Now I do not have the result but it's really long. If you want the place later

Snapey's avatar

dd('scheduler') outputs one word

MwSpaceLLC's avatar

@ORION - I tried 5 minutes ... 10, 30, 1 hour, 1 day, -> cron ('*****'). etc

=)

MwSpaceLLC's avatar

@SNAPEY - I did not understand =(

I tried everything, also like this:

protected function schedule(Schedule $schedule)
{
    dd($schedule->command('elena:help')->everyMinute());
}

As I wrote before, if I leave this. it works:

protected function schedule(Schedule $schedule)
{
        Artisan :: call ('elena: help');
}
Snapey's avatar

so it hits that dd?

and you application is not in maintenance mode?

1 like
MwSpaceLLC's avatar

@SNAPEY - no friend, on this there are already stumbled a year ago in another project =)

artisan not work if maintenance mode

Snapey's avatar

artisan not work if maintenance mode

not correct

MwSpaceLLC's avatar

@SNAPEY - ok sorry, but an old project of mine did not work. I thought it was that =(

Snapey's avatar

did you try withoutOverlapping at some point?

cmathis's avatar

Thanks, this helped resolve the issue for me after I upgraded PHP from 7.2 to 7.3 and restarted the server. Clearing the cache stopped the "No scheduled commands are ready to run." message and allowed the scheduled jobs to execute as expected.

MwSpaceLLC's avatar

@SNAPEY - no.. never...

thanks for the info but nothing. yesterday we had read a cache of commands and we had already tried to delete it =(

Snapey's avatar

It might be the language, but first you say '...already tried'

But then you say 'no.. never...'

If it was related to withoutOverlapping then it should be fixed now.

MwSpaceLLC's avatar

@SNAPEY - ps: I'm Italian and sometimes I write with google to speed up.

We have tried:

first without withoutOverlapping ()

then with withoutOverlapping ()

In no case has it ever worked. Also removed the cache.

consider that now the cron is always connected. and there is no trace of operation. only No scheduled commands are ready to run.

We contacted Laravel. but obviously it does not support us.

for now the cron is scheduled directly, but we do not like this because the app is multidomain and we would like to manage everything with laravel.

OriOn's avatar

Since this problem is still open I was wondering what would happen if you would to place the content of the command that refuses to process into one that you said was working. Have you tried placing the content of the handle method into the handle method of elena:help ?

MwSpaceLLC's avatar

@ORION - Thank you for your reply, but the problem is that the CRON laravel queue is not processed. The command works perfectly if, for example, we call it with:

php artisan elena: help

or put in crontab -e:

* * * * * cd /var/www/myfolder.com/ && php artisan elena: help >> crontab.laravel

or we insert in the schedule function (Schedule $ schedule) only:

Artisan :: call ('elena: elp')

therefore: Any scheduled (not just elena) command is not executed.

OriOn's avatar

Hi there, I understand now better the problem, thanks for the clarifications. I believe the cron job is working fine but for some reasons yet to identify, scheduler:run do not identify any command as "due". I went back to [this episode] (https://laracasts.com/series/intermediate-laravel/episodes/1) in which Jeffrey explained a bit the set-up for cron and I think something that could give us a clue on what's going on is missing.

you mentioned your cron job is * * * * * cd /var/www/myfolder.com/ && php artisan schedule:run >> crontab.laravel

Laravel's documentation is specifying that schedule:run has 2 outputs the first one for logs and second for errors.

could you please update your cron job into * * * * * cd /var/www/myfolder.com/ && php artisan schedule:run 1>> crontab.laravel 2>> cronerrors.laravel

hopefully something pops in this last file

1 like
Snapey's avatar

@orion unfortunately none of that is relevant because according to @mwspacellc php artisan schedule:run also says there are no jobs to run.

Unfortunately they are unable to debug why the scheduler thinks there is nothing due.

Altering the way cron is executed will not help.

1 like
MwSpaceLLC's avatar

Unfortunately still today nothing that works properly.

No scheduled commands are ready to run

This is our Crohn we have only moved www-data user for not having problems reading log permissions:

* * * * * cd /var/www/my.folder.com/ && php artisan schedule: run >> crontab.www-data

* * * * * cd /var/www/my.folder.com/ && php artisan sdi: queue >> crontab.www-data

Only the direct command is executed.

We have already successfully added the user to the same www-data group, with the same permissions. if anyone knows how to properly add users to www-data on debian removing all the problems of reading / writing saei happy.

this is because if I run the artisan command with a user other than www-data, if it generates an error log, then laravel can not read it.

Greetings from @mwspacellc

ajdk2's avatar

@MWSPACELLC - did you already solve this issue with scheduler? I also dealing with this issue right now and dont have any yet clue why this is happening.

Next

Please or to participate in this conversation.