lundi 24 décembre 2018

Laravel 5 Run queue:work on laravel schedule

I have schedule like this

<?php

namespace App\Console;

use Illuminate\Support\Facades\Artisan;
use Illuminate\Console\Scheduling\Schedule;
protected function schedule(Schedule $schedule)
{
   Artisan::call('queue:work');
}

I add this on my cronjob
* * * * * cd /var/www/html/my_script_address && php artisan schedule:run
Is it correct code? Because every minute run Artisan::call('queue:work').
Is it better way?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire