ralphjsmit / laravel-horizon-cron-supervisor

A modern solution for running Laravel Horizon with a CRON-based supervisor.
https://ralphjsmit.com
MIT License
51 stars 2 forks source link

Only works in localhost #7

Open hipoagencia opened 11 months ago

hipoagencia commented 11 months ago

Hello! I cant make it work on live server. I need to do anything extra?

Thanks

ralphjsmit commented 11 months ago

Hi! I can't help you without more info, so please describe the behavior that you're seeing vs what you're expecting to see.

FrazeColder commented 2 months ago

I am having the same problem here. On server I get:

2024-09-01 15:27:02 Running ['artisan' supervisor:check] ..... 454.01ms FAIL ⇂ '/usr/local/php83/bin/php' 'artisan' supervisor:check > '/dev/null' 2>&1

But I don't get any log error or anything.. how can I debug it?

FrazeColder commented 2 months ago

Update: When I run php artisan schedule:run no jobs at all are being started? I get:

No scheduled commands are ready to run.

FrazeColder commented 2 months ago

Somehow I am also not seeing any cronjobs being dispatched when running php artisan schedule:run. I get

INFO No scheduled commands are ready to run.

I have run composer dump-autoload and php artisan cache:clear but I am still not seeing any cronjobs being dispatched.

However, when I run php artisan I can see the command supervisor:check.

How can this be, what am I doing wrong?

ralphjsmit commented 2 months ago

Can you try running php artisan supervisor:check manually?

Somehow I am also not seeing any cronjobs being dispatched when running php artisan schedule:run.

This is correct, because the job is only scheduled to run "every three minutes". Therefore, only if you would run this command manually at exactly the start of the 3rd minute would you see anything, otherwise it will always see "nothing ready to run".

FrazeColder commented 2 months ago

php artisan supervisor:check starts horizon on both, local env and server

ralphjsmit commented 2 months ago

Okay, that's very weird.. Then I really don't know why it would fail on production via the scheduler if manually triggering all works. You can try to look at the global PHP log still.

skeemer commented 2 months ago

This package is set to run every 3 minutes starting on the hour. Did you run php artisan schedule:run during one of those minutes when testing?