PloneRSS and CRON
This How-to applies to: Any version.
This is a relatively straightforward operation on a Unix system, if any Windows users would like to contribute an equivalent mechanism then feel free.
Prerequisites
- CRON
- wget
Both of these should be installed by default on a Unix system. (if not :: Use the web!)
The Manager
You will need to log into Plone as a Manager and add an item of type RSS Manager. I recommend you put this in your root folder and once created, rename it to 'rss_manager'.
Once created, viewing the RSS manager should try to update any existing fields (hopefully by this point you've created a few). This screen gives you a fair bit of detail (see the screenshots) but of course updates are only activated when you view the page.
Next, add a user called cron to your Plone instance and give cron Manager privileges. (please use 'cron', this user id is hard-coded into the software)
Now you can create an appropriate crontab entry by typing;
crontab -e
then enter;
# m h dom mon dow command
MAILTO=<your_email_address>
0,15,30,45 * * * * wget <URL_of_your_rss_manager>/rss_manager_cron --output-file=- --output-document=-
Which will attempt to update your feeds every 15 minutes. The URL of your rss manager might be something like;
http://my_domain.com/rss_manager (then you add /rss_manager_cron on top of this)
By default this will try an anonymous request, which will fail due to lack of permission. To fix this, edit the .wgetrc file in your home directory (this will be /root/.wgetrc if you've followed the instructions above) and add;
user=cron
password=<cron_s_password>
At which point you should be done .. every 15 mins you should see an email telling you what has been updated. Once you're happy that things are working Ok, you can filter these emails however you wish. If you don't want to see the emails, simply add the following to the wget line in the crontab statement;
> /dev/null 2>&1
..