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

ahoi's avatar
Level 5

php artisan schedule:run No scheduled commands are ready to run.

Hi everybody,

that's a strange situation:

I edited my app/Console/Kernel.php like this:

<?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
        = [//
        ];
    
    /**
     * Define the application's command schedule.
     *
     * @param  \Illuminate\Console\Scheduling\Schedule $schedule
     *
     * @return void
     */
    protected function schedule(Schedule $schedule)
    {
        $schedule->command('hello:world')->runInBackground()->daily();
    }
    
    /**
     * Register the commands for the application.
     *
     * @return void
     */
    protected function commands()
    {
        $this->load(__DIR__.'/Commands');
        
        require base_path('routes/console.php');
    }
}

hello:world is defined app/Console/Commands/HelloWorld.php:

<?php

namespace App\Console\Commands;

use Carbon\Carbon;
use Illuminate\Support\Facades\Cache;
use Illuminate\Console\Command;
use App\Hello;

class HelloWorld extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'hello:world';
    
    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Say hello to the world';
    
    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }
    
    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        $model = new Hello();
        $data    = $model->doStuff();
        
        if (!$data) {
            $this->warn('Did not work out');
            
            return false;
        }
        
        $this->info('Hello worldd');
        return true;
    }
}

I did this before running:

php artisan cache:clear && php artisan clear-compiled && composer --dump-autoload, but if I do php artisan schedule:run I get

No scheduled commands are ready to run.

What did I miss?

Edit: everyMinute() instead of daily() works... That's strange... What can I do to make daily() work?

0 likes
7 replies
Nakov's avatar

Based on the documentation daily runs at midnight. So that's why you think that it does not work, when it didn't actually reached to the right time yet. Try using dailyAt instead and specify the time when to execute.

Snapey's avatar

daily is a shortcut for at 00:00

ahoi's avatar
Level 5

Hi,

thank you for your replies.

The problem is: Midnight is over now and if I perform schedule:run there are still no scheduled items available.

Nakov's avatar

@ahoi you should have a cron job that will run each minute which will then run your scheduled commands at the specified time. Or if you want to run it manually then you need to run schedule:run at exactly 00:00 on your computer/server.

ahoi's avatar
Level 5

Hi @nakov

But if the cron does not run and I run schedule:run manually (lets say at 4pm), all jobs that have not been processed yet are not being run?

Snapey's avatar
Snapey
Best Answer
Level 122

They are only run when the time exactly matches the cron pattern. There is no concept of scheduler tasks being outstanding.

1 like
ahoi's avatar
Level 5

Aaaah, okay - I did not know that. How about the between() method? If I do a between('04:30', '23:50'): How does the scheduler decide to run a scheduled command?

Please or to participate in this conversation.