Is it possible to run some other arrtisan command when we run php artisan serve
. at the same time ? Is there any way to do that?
Asked
Active
Viewed 1,054 times
0

Tushar
- 13
- 3
-
run it in a different terminal/command prompt window – apokryfos May 30 '21 at 20:54
-
actually i want to create a queue job for send sms . But to run queue job i have to run "php artisan queue:work" . how do i run it into a server when server starts into a hosting ? – Tushar May 30 '21 at 21:27
-
In [the Docs](https://laravel.com/docs/8.x/queues#running-the-queue-worker) Laravel suggests to use [supervisor](http://supervisord.org/index.html) to keep the queue worker running in the background – apokryfos May 31 '21 at 07:50
-
Did you have any luck with getting this sorted? – Mhluzi Bhaka Jun 01 '21 at 21:45
2 Answers
1
You can run multiple commands separated by a semi-colon.
For example:
php artisan view:clear; php artisan route:clear; php artisan cache:clear; php artisan config:clear
Would that help?

Mhluzi Bhaka
- 1,364
- 3
- 19
- 42
0
You need to setup supervisor on the server. It will start the queue:work for you. It can also run multiple executions of same commands.