You are here:  » Using the cron function


Using the cron function

Submitted by wilkins on Sat, 2015-03-07 10:09 in

Hi David

Started to update all our sites and using latest version including the automation and cron function. Both work great, however I am having problems with the affwin feed at the moment as feeds are timing out (even smaller feeds), affwin are aware but no resolution!

My question is with the built in cron function. At present it does both the downloading of the products and importing them at the same time, this works great for every other company except affwin (who are our main company for feeds)

Is there any way in this cron process to split the downloading and the importing to site.

I really like everything in the admin, the other alternative would mean going back to using server crons through ssh, this way I could cron the downloads one night, checked they worked in the day and then cron the imports the next night.Not really something I want to do.

Regards

Brent

Submitted by support on Sat, 2015-03-07 16:00

Hello Brent,

Affiliate Window feeds should work just fine - the demo site is all Affiliate Window feeds, and they are also the primary network that I work with.

The first thing I normally suggest when fetching is timing out is to switch between the two handler methods (PHP or CRON). Since 14/06A the default setting for $config_automationHandler is "auto" which attempts to use "curl" out of preference, falling back to "php" if CURL function are not installed in your PHP installations, so to force PHP handling, if you edit config.advanced.php and change line 43 as follows:

  $config_automationHandler = "php";

Otherwise, you can separate the fetch / import process into separate commands, by using the exact same command line as used for cron.php but replacing cron.php with:

fetch.php @ALL

(runs all Automation Tool jobs)

and

import.php @ALL

(imports all feeds)

If you're still experiencing the timeout (I assume the Automation Tool reports "Transfer Failed"?) if you'd like me to check out one of your smaller Affiliate Window feeds I'll happily check it out on my test server - email me the details and I take a look...

Cheers,
David.
--
PriceTapestry.com

Submitted by wilkins on Sat, 2015-03-07 16:20

Hi David

Thanks for that, will have a go. I have bee looking at the automation and trying 'Abort if less than' function. I think this may solve the issue until affwin get back to me. A couple of questions regarding this function.

1 Is the size of the feed before its unzipped?
2 If aborted does it keep the old feed when it does it imports.
3 If one feed fails will the rest still work OK?

Regards

Brent

Submitted by support on Sat, 2015-03-07 16:47

Hi Brent,

Re 1; the Min Size Abort applies to the raw download size, before any attempt to unzip

Re 2; Correct, that's the intention of the feature so that the last good feed is not overwritten with a failed download and therefore it won't result in the merchant's products being deleted.

Re 3; Correct, each Automation Tool job is processed independently - if a job fails the script simply continue with the next one...

Cheers,
David.
--
PriceTapestry.com