Question:
How can i run php /dirpath/to/artisan artisan list?

Problem

Not any output when run php /home/directory ... cmd

I try run supervisor run conf with this command:


php /home/example artisan queue:work


and after run supervisor, my jobs dosent dispach and my worker log is empty.

I got to linux shell and run this command:


php /home/example artisan queue:work 


but that command dosnt work and I dont recevie any output.

Then i try to run this:


cd /home/example and then 

php artisan queue:work 


and then that work successfully and show to me:


info processing jobs from the [default] queue


Solution

The problem is that you're not really targeting artisans.


artisan is a file, so a proper command would look like this:


php /home/example/artisan {whatever artisan command you want to run}


That being said, your supervisor configuration should probably mimic the example >from the documentation:


[program:laravel-worker]

process_name=%(program_name)s_%(process_num)02d

command=php /home/example/artisan queue:work sqs --sleep=3 --tries=3 --max-time=3600

autostart=true

autorestart=true

stopasgroup=true

killasgroup=true

user=forge

numprocs=8

redirect_stderr=true

stdout_logfile=/home/forge/app.com/worker.log

stopwaitsecs=3600


Answered by: >Repox

Credit: >StackOverflow


Blog links:

>How to show encrypted user id in URL in Laravel?

>How to fix Laravel LiveWire listener?


Nisha Patel

Nisha Patel

Submit
0 Answers