You are here:  » Automation Basics


Automation Basics

Submitted by EIF Media on Tue, 2014-01-07 21:58 in

Hello again David,

I am trying to set Price Tapestry to fetch each of my CSV/XML feeds once a week and import, but I'm afraid I'm falling at the first hurdle (your explicitly simple instructions are clearly too much for me, yet again!)

When creating a 'New Job' I complete the file name, input the CSV URL from my affiliate site (http so I have left the filepaths unchanged). I have selected to unzip as the files are zipped when I follow the URL in my browser and then I clicked 'Save and Run' to test and received the 'ERROR - TRANSFER FAILED' message.

The 2 URLs I have attempted so far are:

{link saved}

and
{link saved}

Presumably once I have passed this step I will need to run cron.php to fetch and import all of the feeds - is there a way to call this once a week without invocation once the feeds have initially been registered?

Thanks,
Dan

Submitted by support on Wed, 2014-01-08 09:51

Hi Dan,

If both feeds are causing TRANSFER FAILED it's most likely that URL Wrappers (allow_url_fopen) is not enabled on your sever's PHP configuration which is required for the "php" automation handler.

However, CURL is normally available to use as an alternative; so if you modify config.advanced.php and change line 43 as follows:

  $config_automationHandler = "curl";

...that should do the trick! And then, sure it can be setup on a weekly automated invocation which is exactly what the cron.php is designed for. If you go to the Support Info page of your /admin/ area towards the end of the page you should see the derived CRON commands available for your server. If Option 1 shows as not available modify config.advanced.php and change line 51 as follows:

  $config_CRONPrograms["php"] = "/usr/bin/php";

...reload the page and that might enable Option 1. This is the command to use as the "Command" field in your hosting control panel's CRON section, where you will also be able to set the schedule as required. If your hosting control panel doesn't appear to have anywhere that you can set-up CRON jobs, let me know and I'll point you in the right direction in terms of other options...

Cheers,
David.
--
PriceTapestry.com

Submitted by chrisst1 on Wed, 2014-01-08 11:13

Happy New Year David

Just noticed this thread, I had similar problem when we moved server last year. It may be that if a firewall is installed (particually plesk) an incoming port may need to opened to allow feeds to download to server. May be of some help.

Chris

Submitted by support on Wed, 2014-01-08 11:40

Thanks Chris, and a Happy New Year to you too!

Cheers,
David.
--
PriceTapestry.com

Submitted by EIF Media on Sun, 2014-01-12 21:51

Thanks David,

I've made the changes suggested and I'm now getting an 'OK' status against my feeds so all is working well.

Unfortunately CRON Option 1 is still unavailable after making the latter suggested change.

Dan

Submitted by EIF Media on Mon, 2014-01-13 00:02

Hi David,

I'm afraid I'm still having problems here.

As you will have seen from the links I sent, the http links are for gzip files however whenever I select 'Yes' for 'Unzip?' I get an 'Error - Unzip Failed' message on run. If I select 'No' to Unzip then the file is imported fine, however when I go to register the file is blank (one field with no data) read as csv|124|0|0obviously because the file is still zipped (so downloading the feed from the feeds folder, unzipping and then uploading once again registers fine).

So I then tried automation on a zip file with 'Yes' to 'Unzip?' which returned the 'OK' status but the download doesn't seem to have been actioned at all - the 'Last OK Run' time changes on the automation page, but there is no change in the feeds folder and the 'Modified' column on 'Admin Home' doesn't change (if it's an entirely new feed nothing is shown in the feeds folder nor at 'Admin Home' despite showing an 'OK' run on the 'Automation' page).

When I run automation on a zip file with 'No' to 'Unzip?' it does update across all (Automation, in feeds and Admin Home) but then I still have the same issue of not being able to register a zipped file.

Can you help please?

Another issue I'm having is when I've connected to a zip file via ftp with username and password however when I save and run I'm returned the status '-' and the feed (zipped or otherwise) has not been downloaded to my feeds folder, although the first issue is by far the biggest as that accounts for 90% of my feeds.

Thanks,
Dan

Submitted by support on Mon, 2014-01-13 11:17

Hello Dan,

I'll follow up by email in just a moment with an alternative version of includes/automation.php which uses PHP's internal gzip functions to try...

Cheers,
David.
--
PriceTapestry.com