Search code examples
laravellaravel-5cronforge

laravel 5.5 forge task scheduling cron job


With older versions of Laravel I only had to write a command in Forges controlpanel eg php /home/forge/default/artisan scheduled:run then set the interval and hit schedule button.

Now in Laravel 5.5 I can se that I can add jobs in the kernel.php file eg:

protected function schedule(Schedule $schedule)
    {
        $schedule->command('SomeJob:delete')
               ->daily();
    }

Does this mean I no longer have to setup cron jobs in laravel Forge?


Solution

  • You still need one cron entry to start the scheduler:

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