Can you post more info, for example the cronjob you have set up?
I created a few:
Minute Hour Day of Month Month Day of Week Command Select
Try and put php at the start:
php /home/donny/domains/bedrijvenadministratie.nl/public_html/artisan xml:companylist example
(or the full path to your php binary, for example /usr/bin/php or /usr/local/bin/php)
Also you can try to fire the command yourself on CLI first to check it works.
The first one doesnt work. How can i do the second option?
Find oud where your PHP binary is located by executing
which php
on the command line and use that path.
Use that path to execute the command to check if it works. So if your php is located at /usr/local/bin/php you enter on the command line
/usr/local/bin/php /home/donny/domains/bedrijvenadministratie.nl/public_html/artisan xml:companylist example
and check the output.
/usr/local/bin/php is the result, so next is paste the first line?
Yep, try this on the command line (as one line) and if it works put in the cronjob:
/usr/local/bin/php /home/donny/domains/bedrijvenadministratie.nl/public_html/artisan xml:companylist example
I dont get any errors or something displayed that it doesnt work. Also the XML file isnt generated... If i do php artisan xml:companylist example, the list will be generated
Oke, this works now, but i have 1 problem: the file wont be generated... Could this be the document root?
Check your PHP and make all paths it uses relative to the file.
How can i make it relative? i use normally url('path/to/file.xml');
I am not sure but seems like you have given the wrong path to artisan
.
artisan
is not supposed to be inside your public_html rather one directory up.
Can you check :
/usr/local/bin/php /home/donny/domains/bedrijvenadministratie.nl/artisan xml:companylist
It returns an error... In the public_html are the folders: app, public, vendor and bootstrap... I think i have to move vendor, app and bootstrap 1 dir up?
In DA I usually add a line to the custom httpd.conf for that domain:
|?DOCROOT=/home/<user>/domains/<domain>/public_html/public|
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community