Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No alias in crontab #43

Closed
mavci opened this issue May 24, 2014 · 13 comments
Closed

No alias in crontab #43

mavci opened this issue May 24, 2014 · 13 comments

Comments

@mavci
Copy link

mavci commented May 24, 2014

Hi again,

In Unix system crontab "php .../artisan command" wont work. Need "/usr/bin/env php". Its defined in artisan.

Can you fix this? I'm editing your class for this in my vendor folder.

@bkuhl
Copy link
Member

bkuhl commented May 25, 2014

Confirmed and implemented. See https://github.com/Indatus/dispatcher/releases/tag/v1.2.4

@bkuhl bkuhl closed this as completed May 25, 2014
@mavci
Copy link
Author

mavci commented May 25, 2014

Not need the check for windows or linux? It can be fail in windows, need try

@bkuhl
Copy link
Member

bkuhl commented May 25, 2014

thanks for pointing that out, I tend to forget about Windows users. There's a new version which checks the OS and acts accordingly

@mavci
Copy link
Author

mavci commented May 27, 2014

However, it's still wont work in freebsd. It must be /usr/local/bin/php but its not a linux standart. I thought /usr/local/env is ok for all. What can I do for this? (I hate freebsd)

@mavci
Copy link
Author

mavci commented May 27, 2014

I fix this problem with setting PATH env variable in crontab

PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin

Thanks.

@bkuhl
Copy link
Member

bkuhl commented May 27, 2014

Thanks for posting this workaround. My distro experience is limited, so I'll need some pull requests to help resolve this across distros.

@bkuhl bkuhl reopened this May 27, 2014
@twmbx
Copy link

twmbx commented Sep 19, 2014

yeah some work is needed here... maybe an option to customise the call to the php instance is needed?
I just spent all day trying to debug my own problem which was only solved by specifically calling php-cli using the full path. i'm on shared hosting provided by a small orange, not actually what distro they use.

to be clear i've gotten successful scheduled command execution when altering .../Dispatcher/Services/CommandService.php and specifying that it use 'usr/bin/php-cli' for the command call.

unless there's something i'm missing.

@bkuhl
Copy link
Member

bkuhl commented Sep 19, 2014

That's a good thought, I've added that config setting to the 2.0 to-do list.

Instead of modifying the library, you could add an alias for php for the user that the commands run as.

@twmbx
Copy link

twmbx commented Sep 19, 2014

yeah, an option in a config file would be perfect. :)

@bkuhl
Copy link
Member

bkuhl commented Sep 20, 2014

@twoSeats I've decided to include this feature in the last release available for Laravel 4.3. Everything from this point forward will be for Laravel 5. Can you check out the develop branch and ensure this solution works for you?

@twmbx
Copy link

twmbx commented Sep 22, 2014

@bkuhl just tested it. sorry i took a second, had a break over the weekend. Glad to report that it works like a charm! thanks a lot!

@bkuhl
Copy link
Member

bkuhl commented Sep 22, 2014

This is now available in 1.4.1: https://github.com/Indatus/dispatcher/releases/tag/v1.4.1

Thanks for the input and the help, you rock!

@bkuhl bkuhl closed this as completed Sep 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants