ProticLink
Team
2 weeks ago
#1
Shared hosting usually does not allow long-running processes like
1. In
php artisan queue:work. The simple, reliable way is to let the scheduler run the queue every minute.1. In
routes/console.php, schedule the worker:Schedule::command('queue:work --stop-when-empty --max-time=55')->everyMinute()->withoutOverlapping();2. In cPanel → Cron Jobs, add one job that runs every minute:* * * * * cd /home/USER/app && php artisan schedule:run >> /dev/null 2>&1Use the full PHP path from your host if php is an older version. Emails and other jobs will now go out within a minute.