On 21-Nov-1999 Timothy Wilson wrote:
Now let's say that I'd like to display the news from Zope.org on my site. The RSS file is at http://www.zope.org/SiteIndex/news.rss
It's obviously poor manners to get the RSS file directly from the site every time the page is requested. What would be the best strategy to display the news on my Linux-based server? I'm really not sure how to proceed here. Any help would be greatly appreciated.
Tim, I do this rather easily with a cron job that runs every hour. For instance, I have a SiteSummary object on my server called freshmeatXML. Then I created a shell script called /usr/local/bin/updateXML with these contents: #!/bin/sh lynx -source http://localhost/freshmeatXML/importFromURL?url=http://freshmeat.net/ backend/fm.rdf So then I just linked the script in /etc/cron.daily (if you are lucky enough to have a RedHat or Mandrake box, putting scripts in this directory will automatically 'cronify' them) If you don't have RH or similar, you can put them in cron directly by running 'crontab -e' and inserting the following line: 00 * * * * /usr/local/bin/updateXML This will run the script at every minute zero. Which of course, occurs once an hour. Hope this helps.. Adam -- M. Adam Kendall | mak@kha0s.org | "There's never enough time to do http://kha0s.org | all the nothing you want." | --Bill Watterson (Calvin and Hobbes)