Laravel 5.5 Queue solution with shared hosting

时间:2018-01-15 18:17:03

标签: php laravel laravel-5 cron laravel-5.5

I have searched a lot about this before posting it here and I think still there is no clear answer. The most elegant solution I found so far is

$schedule->command('queue:work --daemon')->everyMinute()->withoutOverlapping();

However, some people has reported that this was keeping the schedule:run command going and was creating several new queue:work commands.

In Laravel 5.5, I saw this code $schedule->job(new Heartbeat)->everyFiveMinutes();

https://laravel.com/docs/5.5/scheduling#scheduling-queued-jobs According to doc:

The job method may be used to schedule a queued job. This method provides a convenient way to schedule jobs without using the call method to manually create Closures to queue the job

Not sure if this is the right solution to run queue:work without any problem? What are you using for shared hosting where you can not access shell?

0 个答案:

没有答案