Support the ongoing development of Laravel.io →
Configuration IOC Queues
Last updated 1 year ago.
0

Can you post more info, for example the cronjob you have set up?

Last updated 1 year ago.
0

I created a few:

Minute Hour Day of Month Month Day of Week Command Select

          • home/donny/domains/bedrijvenadministratie.nl/public_html artisan xml:companylist example
          • /home/donny/domains/bedrijvenadministratie.nl/public_html php artisan xml:companylist preview */5 * * * * /home/donny/domains/bedrijvenadministratie.nl/public_html php artisan xml:companylist preview
          • /home/donny/domains/bedrijvenadministratie.nl/public_html php artisan xml:companylist
Last updated 1 year ago.
0

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.

Last updated 1 year ago.
0

The first one doesnt work. How can i do the second option?

Last updated 1 year ago.
0

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.

Last updated 1 year ago.
0

/usr/local/bin/php is the result, so next is paste the first line?

Last updated 1 year ago.
0

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
Last updated 1 year ago.
0

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

Last updated 1 year ago.
0

Oke, this works now, but i have 1 problem: the file wont be generated... Could this be the document root?

Last updated 1 year ago.
0

Check your PHP and make all paths it uses relative to the file.

Last updated 1 year ago.
0

How can i make it relative? i use normally url('path/to/file.xml');

Last updated 1 year ago.
0

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
Last updated 1 year ago.
0

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?

Last updated 1 year ago.
0

In DA I usually add a line to the custom httpd.conf for that domain:

|?DOCROOT=/home/<user>/domains/<domain>/public_html/public|
Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Donny5300 donny5300 Joined 3 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.