title: How to run queue worker on shared hosting
body: <p>My Laravel application has a <a href="https://laravel.com/docs/5.6/events#queued-event-listeners" rel="noreferrer">queued event listener</a> and I have also set up the cronjob to run <a href="https://laravel.com/docs/5.6/scheduling" rel="noreferrer"><code>schedule:run</code></a> every minute.</p>
  
  <p>But I don't know how I can run the <code>php artisan queue:worker</code> command persistently in the background. I found <a href="https://laracasts.com/discuss/channels/laravel/free-queue-solution-for-shared-hosting" rel="noreferrer">this thread</a> where it was the most voted approach:</p>
  
  <pre><code>$schedule-&gt;command('queue:work --daemon')-&gt;everyMinute()-&gt;withoutOverlapping();
  </code></pre>
  
  <p>However, on a <a href="https://laracasts.com/discuss/channels/servers/database-queue-on-shared-hosting" rel="noreferrer">different thread</a> some people complained that the above-mentioned command creates multiple queue worker.</p>
  
  <p>How can I safely run a queue worker?</p>