Indatus / dispatcher

Dispatcher is a Laravel artisan command scheduling tool used to schedule artisan commands within your project so you don't need to touch your crontab when deploying.
MIT License
1.06k stars 70 forks source link

CentOS / cPanel issues with Dispatcher #117

Closed CedNet closed 9 years ago

CedNet commented 9 years ago

Hi, I have a cPanel CentOS server 6.6 running a large project dependent on a cron that exeucutes stuff I've put on queue and I've just switched to Dispatcher ~1.4 for all its nice features that allows for advanced scheduling.

This is the cron command set to run every minute (it is running as per: /var/log/cron):

 php5-cli -f /home/xxx/laravel/artisan scheduled:run

I've double checked that Dispatcher is firing and it is, so no issue there...

But, I ran the --debug tool to find out why the commands still weren't firing and saw that Dispatcher actually executes things again using a CLI command such as:

command:run_queued_jobs: /usr/bin/env php /home/xxx/laravel/artisan command:run_queued_jobs > /dev/null &

Now the problem here is that "php" only in itself does not work with cPanel / CentOS cron scripts. One must use php5-cli.

Can you please somehow make support for switching out which "php" command that should run the commands?

bkuhl commented 9 years ago

You can do it with the executable config option: https://github.com/Indatus/dispatcher/blob/1.4/src/config/config.php#L19