You are here:  » Automate import

Support Forum



Automate import

Submitted by andys1 on Sun, 2008-08-17 13:22 in

Hello

I want to automate the import of the feeds. The feed will already have been downloaded. I don't think I have access to the command line. Is there a script available to do this?

Thanks

Submitted by support on Sun, 2008-08-17 14:11

Hello Andy,

Are you able to setup cron jobs even though you don't have command line access?

If so, you can often automate the import of a named feed using a CRON process similar to this:

wget -O /dev/null http://www.example.com/admin/feeds_import.php?filename=<filename>

"wget" is a program that is installed on most Linux servers that will automatically retrieve the specified document - in this case the import script from the Price Tapestry admin section where is the name of the registered feed...

Cheers,
David.

Submitted by andys1 on Sun, 2008-08-17 14:35

Hello David

Thanks for your help. I do have access to CRON jobs. After I posted I did some looking around and wrote this:

/usr/local/bin/php -q /mypathhere/scripts/import.php @MODIFIED

Is this correct or should I use your example?

Also I am trying to import a large file (manually) In firefox the browser times out and asks me if I want to download the feeds_import.php file. IE7 just times out. Is there any way to stop this?

Thanks

Submitted by support on Sun, 2008-08-17 14:42

Hi Andy,

If the command you have come up with works, that is the best thing to use; as you shouldn't be restricted by any web server imposed time-outs.

The page being offered for download when trying to import a large file manually is indicative of a web server (rather than a PHP) imposed time-out. There's lots of discussion on this in this thread, but ultimately if you find that the you are able to import fully via the CRON process that is the best solution...

Cheers,
David.

Submitted by andys1 on Sun, 2008-08-17 15:27

Thanks David this has been a great help.