Jack_mcs Posted September 28 Share Posted September 28 I've never ran across a case where it would run in admin but not via cron so I don't have a solution for you. You could try changing this line Quote 'include_once 'includes/application_top.php'; to this Quote get_cwd() . '/include_once 'includes/application_top.php'; If that doesn't work, you could try removing the chdir command and copy the file to the root to see if it will run from there. If that doesn't work, then this is the sort of problem that needs hands-on troubleshooting to find the cause. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Mort-lemur Posted September 29 Share Posted September 29 @Jack_mcs I have eventually found a solution that works, thanks to a post on stackoverflow where someone else could not run a .php file via cron. The solution that works for me is as follows: (probably a very messy solution) 1. I moved the googlefeeder.php file to the root and commented out chdir('../'); 2. Created a file called googlefeeder_test.php in the root containing the following code: echo file_get_contents('https://mysite.co.uk/googlefeeder.php?noftp=1/'); 3. Set a cron job with the following code: php /home/myusername/public_html/googlefeeder_test.php This runs the googlefeeder.php code as a URL and updates the data-feed file without uploading to google, as google merchant center is set to retrieve this file once per day. This still has me puzzled though as I have no problem running googlesitemap as a cron but googlefeeder just would not run. Thank you for the help. Smoky Barnable 1 Quote Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.