I am using laravel 7, I create a command that working properly on localhost with schedule:run command but not working on cpanel
here is my corn job command which I am trying to configure in my cpanel. (I have shared cpanel hosting)
/usr/bin/php -d register_argc_argv=on /home/flakhost/sashatraders.com/@core/artisan schedule:run >> /dev/null 2>&1
My kernel.php file code is
<?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 = [
Commands\BoostRank::class,
];
/**
* 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('boost:rank')
->everyMinute();
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php');
}
}
I believe all code is fine but there is some problem in my cpanel cron job command. Kind Reagds: