I want to send mail using queue. Laravel queue works well in local server with the command "php artisan queue:listen". How to process the queue in online server
0
votes
3 Answers
1
votes
0
votes
0
votes
You can schedule you queue command in kernel file as below,
protected function schedule(Schedule $schedule)
{
$schedule->command('queue:work --tries=3')->cron('* * * * * *');
}
and set laravel cron on server as below,
* * * * * php /path-to-your-project/artisan schedule:run >> /dev/null 2>&1
So this main cron will run mail:queue every minute.