When should I run queue/listen instead of queue/run? Definitions from the documentation:


queue/run: runs all the queued-up jobs
queue/listen: listens to
the queue and runs new jobs


Example case:

The runQueueAutomatically config option is set to false, and a cron job is calling queue/run every minute: /1 * * * * /path/to/project/root/craft queue/run.

In this case:


Should I run queue/listen instead of queue/run?
Does calling a new
queue/run when a queue/run job is potentially still in process,
could caused queue issues?
queue/run - should be used if you're going to manually execute this command via a cron job or such, because it runs any pending queue jobs, then exits
queue/listen - should be used if you want it to constantly poll (with a reasonable cooldown interval) for new jobs, and run them, because it runs a listen process that spawns a sub-process to run queue jobs as they come in


More here: Robust queue job handling in Craft CMS