Google Feed Ftp Upload Not Working Via Cron

PHP 7.2 , CScart 4.12.1

Google merchant account is set up and if I use Administration > Export Data > Data Feeds > [gear icon] > Upload to FTP server the product feed is correctly received and processed by Google ... great !

Next step was to set it up as a cron job which runs just fine as evidenced by a fresh copy of google_base.csv being created in /web/var/files/1/ at the allotted times.

BUT

Google doesn't get the update !

It seems as though the cron triggered FTP upload is failing but there is nothing in the error logs to give me any clue as to why. I have double checked and manually triggering the FTP upload works every time so the ftp password, filename and account etc is all set up correctly.

Thought I had spotted the issue

Cron export settings was set to Server instead of ftp, but even after changing that it is still not working.

Any other ideas ?

What is the cron command line that you're using? You wil need to specify what layout to use.

What is the cron command line that you're using? You wil need to specify what layout to use.

30 1,7,13,19 * * * /usr/bin/php /var/www/clients/client1/web1/web/admin.php --dispatch=exim.cron_export --cron_password=MYPASS --switch_company_id=0
It works perfectly if I upload via the Upload to FTP server option on the gear icon but refuses to update Google via the cron job. The cron job works as expected if Export by cron is set to server but not when set to FTP.
layout: google_export
filename: google_base.csv
ftpserver: uploads.google.com

I think I may finally have it working:

1. I was still able to login using Filezilla from a different IP address so figured maybe Google had blocked ftp from our server's IP address, presumably because of so many failed attempts. Changing the ftp password allowed logins to restart.

2.changed the filename to google_base.txt . Although a manual upload of a .csv file had definitely worked Google doesn't include csv in the list of allowed file types: "Use primary feeds to upload your product data to Merchant Center using text (.txt) files, XML (.xml) files, Google Sheets, or the Google Content API for Shopping"

Tested manually and with a cron and it worked!

I will let it run for a few days and see if it stays working.

If you use 'txt' and TAB separate the data, Google will accept it.

If you use 'txt' and TAB separate the data, Google will accept it.

yes that is what I did but actually left it as comma separated which has worked just fine. Im not 100% whether it was renaming it to txt or resetting the ftp settings which cracked it but one or both of those sorted it.

It is a bug that cron script doesn't log and output the error that it couldn't connect to FTP, while it must. For example cron in Plesk can let you know if something went wrong; but since CS-Cart doesn't report the error that it couldn't connect to FTP (which is another bug), it reports that cron finished successfully.