Created and registered test commands as shown below in the app\console\commands\Update.php file:
`
//signature
protected $signature = 'Thumi';
…….
//handle to execute console command
public function handle()
{
$user = User::findOrFail(6);
$user->update(['fname' => 'kennnn']);
}
app\console\Kernel.php
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
Commands\Update::class
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
$schedule->command('Thumi')
->everyFiveMinutes();
}
`
The commands are executing on CLI on localhost . Php artisan Thumi Below is a command I have inserted in the Cpanel crons. */5 * * * * /usr/local/bin/php /home/bladeres/public_html/WMS/artisan schedule:run >> /dev/null 2>&1 Email notification disregarded. Also, I changed php version to 7.1, could it be the reason or an issue with shared hosting provider?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire