title: Laravel queue listener times out
body: <p>On my Linux server I have the following cron:</p>
  
  <pre><code>* * * * * php /var/www/core/v1/general-api/artisan schedule:run &gt;&gt; /dev/null 2&gt;&amp;1
  </code></pre>
  
  <p>The CRON works correctly. I have a scheduled command defined in my <code>Kernel.php</code> as such:</p>
  
  <pre><code>    protected function schedule(Schedule $schedule)
      {
          $schedule-&gt;command('pickup:save')
              -&gt;dailyAt('01:00');
          $schedule-&gt;command('queue:restart')-&gt;hourly();
      }
  </code></pre>
  
  <p>The scheduled task at 1AM runs my custom command <code>php artisan pickup:save</code>. The only thing this command does is dispatch a Job I have defined:</p>
  
  <pre><code>    public function handle()
      {
          $job = (new SaveDailyPropertyPickup());
          dispatch($job);
      }
  </code></pre>
  
  <p>So this job is dispatched and since I am using the database driver for my Queues, a new row is inserted into the <code>jobs</code> table.</p>
  
  <p>Everything works perfectly up to here.</p>
  
  <p>Since I need a queue listener to process the queue and since this queue listener has to run basically forever, I start the queue listener like this:</p>
  
  <pre><code>nohup php artisan queue:listen --tries=3 &amp;
  </code></pre>
  
  <p>This will write all the logs from <code>nohup</code> to a file called <code>nohup.out</code> in my <code>/home</code> directory</p>
  
  <p>What happens is this: The first time, queue is processed and the code defined in the <code>handle</code> function of my <code>SaveDailyPropertyPickup</code> job is executed.</p>
  
  <p>AFTER it is executed once, my queue listener just <strong>exits</strong>. When I check the logs <code>nohup.out</code>, I can see the following error:</p>
  
  <pre><code>In Process.php line 1335:
  
    The process "'/usr/bin/php7.1' 'artisan' queue:work '' --once --queue='default' 
    --delay=0 --memory=128 --sleep=3 --tries=3" exceeded the timeout of 60 seconds.
  </code></pre>
  
  <p>I checked <a href="https://stackoverflow.com/questions/25877752/laravel-queue-process-timeout-error">this answer</a> and it says to specify timeout as 0 when I start the queue listener but there are also answers not recommending this approach. I haven't tried it so I dont know if it will work in my situation.</p>
  
  <p>Any recommendations for my current situation?</p>
  
  <p>The Laravel version is 5.4</p>
  
  <p>Thanks</p>