I am running my web app under godaddy shared hosting, and I am trying to run a cron job which will call my schedule task in my laravel app. For some reason the scheduler is not being called. These are the commands in godaddy that I have tried so far:
- php /path/to/artisan schedule:run >> /dev/null 2>&1
- home/lulzimf/php /home/path/to/artisan schedule:run 1>> /dev/null 2>&1
- usr/local/php /home/path/to/artisan schedule:run 1>> /dev/null 2>&1
- /usr/local/bin /path/to/artisan schedule:run >> /dev/null 2>&1
None of these above commands seems to execute my task scheduler, I have tried calling the command from using artisan command, it works... What do you think this is not working?
This is how my Kernel looks like:
<?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\Inspire',
'App\Console\Commands\UpdateClassSession',
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
$schedule->command('inspire')
->hourly();
$schedule->command('class-session-update')
->everyFiveMinutes();
}
}