Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Crazylife's avatar

How to run php artisan serve and queue on the same time in cmd?

I use cmd to run my application, i need to run php artisan serve in order to start my application. I push something into the queue, and i need to use php artisan listen:queue to run the job. Now i need to manually stop application and change command to php artisan listen:queue to perform the job, how can i run the queue automatically whenever there's job stored in database? I also referred to https://laravel.com/docs/5.5/queues#supervisor-configuration but i don't understand how it works. Anyone can guide me? Thanks.

0 likes
2 replies
dlucian's avatar

It sounds like you're looking for a "artisan shell command" and not a queue system. Why do you think queue is appropriate here?

@RamjithAp is right, you might need a scheduled cron job that runs every minute, checks the queue and runs something (including php artisan serve) if there's anything in the queue.

Please or to participate in this conversation.