Support the ongoing development of Laravel.io →
posted 6 years ago
Laravel

My Laravel scheduler don't work anymore, this is my 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 = [
        //
    ];

    /**
     * Define the application's command schedule.
     *
     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
     * @return void
     */
    protected function schedule(Schedule $schedule)
    {
        $schedule->exec('echo "Done!"')->everyMinute()->appendOutputTo(storage_path('logs/Schedule.log'))->emailOutputTo('a.berbers@toverland.nl');
        // $schedule->command('inspire')
        //          ->hourly();
        $schedule->command('telescope:prune')->daily();
        $schedule->command('synergy:sync')->everyMinute()->appendOutputTo(storage_path('logs/SynergySync.log'))->emailOutputTo('email@domain.com');
    }

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

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

I had added in my crontab:

* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1

With the correct path ofcourse..

When I run the command:

php artisan schedule:run

I've got the following output:

No scheduled commands are ready to run.

Is there a way to debug the scheduler? On an other Laravel project on the same server the scheduler works..

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Mirkin mirkin1993 Joined 27 Nov 2018

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.