Cron task fail to work not been able to import the products


I’m trying to import products using cron task as advised on import products option ```
php /path/to/cart/admin.php -p --dispatch=advanced_import.import.import --preset_id=1 --switch_company_id=13

So for my case it will be php /home/cloud/public_html/ -p --dispatch=advanced_import.import.import --preset_id=1 --switch_company_id=13

I added the trask on cPanel cron tab every minute for testing purposes

          • php /home/cloud/public_html/ -p --dispatch=advanced_import.import.import --preset_id=1 --switch_company_id=13

Then I check log here /var/log/cron and i found the task

Jul 4 11:49:01 cpanel2 CROND[12166]: (cloud) CMD (php /home/cloud/public_html/ -p --dispatch=advanced_import.import.import --preset_id=1 --switch_company_id=13)

All this cron jobs fail with no effect importing any product. I’m using CentOS 7 on my server. When I run the script via ssh it works. What could be the problem ?

Check the php error log.

I don’t use cPanel anymore but I recall having to specify the php version.

1 Like

Thanks a lot @thetool