Scheduling Updates

Contents

[ hide ]

    This page is a stub which I hope to expand soon to offer a fuller discussion of the different ways that you can set up FeedWordPress to schedule updates.

    In order for your aggregator to stay up-to-date with your syndicated sources, you need for FeedWordPress to periodically check in with each feed for any new or updated content to syndicate. FeedWordPress performs this check-in by by polling the servers that host each feed with conditional HTTP GET requests to see whether the feed has changed since the last check-in, and, if so, which items on the feed represent new content that has not yet been syndicated, or updates of existing items that had already been syndicated.

    FeedWordPress currently offers three options for scheduling these check-ins. (1) You can schedule them to happen automatically on an approximate schedule (by hooking in the update scheduler to the WordPress page load process). (2) You can set up a cron job to schedule precisely when check-ins will happen. Or (3) you can set up FeedWordPress to only update when you manually request an update from within the FeedWordPress interface. To set up the method you want to use, go to Syndication –> Settings in the WordPress administrative interface, and select the setting you want under Check for updates:

    Choose Check for updates automatically if you want (1) FeedWordPress to check for updates automatically when users send in a request to view pages on your blog. Choose Check for updates only when I request if you want (2) to schedule updates using requests sent by a cron job, or (3) to manage importing and updating content manually.

    The trade-off involved in this choice is that (cron-less) automatic updates will allow you to keep your syndication up-to-date automatically, without having to use any kind of cron job or other external scheduling tool — but at the cost of slowing down the page load time for somewhere between 1 page load every 10 minutes and 1 page load every 60 minutes. (How frequently you encounter the slowdown will depend in part on how many feeds you syndicate.) Manual updates or updates scheduled with a scheduling tool like cron eliminate the occasional slowdown, and also give you more precise control over how updates are scheduled — but not all web hosts offer access to cron or similar tools. (And even if your web host does, you may not want the added complexity of having to configure a crontab file.)

    If you selected Check for updates only when I request because you wanted (2) to schedule updates using a cron job, you will need to add a new line to your crontab file which will send in the update request to FeedWordPress on a regular schedule. To send the update request you will be sending an HTTP request to a special URL that FeedWordPress makes available — http://example.com/?update_feedwordpress=1, where you replace http://example.com/ with the real address of your WordPress installation. So in addition to cron, you also need access to a tool such as curl or wget which can send HTTP requests from the command line. For example, here is a crontab entry which uses curl to do a check-in for a FeedWordPress installation at http://example.com once every 10 minutes:

     */10 * * * * /usr/bin/curl --silent http://example.com/?update_feedwordpress=1
    

    N.B. It is important to understand that this crontab entry will not make it so that FeedWordPress checks every feed for updates once every 10 minutes. Most webmasters consider it extremely rude and downright abusive to set up an automated process that polls a web server that frequently. What this crontab entry does do is set it up so that, once every 10 minutes, FeedWordPress will check whether there are any feeds *ready to be polled for updates*, and, if there are, to poll those feeds and perform the update. But when a feed is next considered ready to be polled for updates is determined by scheduling requests that the feed producer included in the feed, or else determined internally by FeedWordPress if the feed producer did not make an explicit scheduling request. In practice, most feeds end up being updated about once every 60 minutes.

    This page is a Wiki! Log in or register an account to edit.

    4 thoughts on “Scheduling Updates

    1. Hi, I was told by the host that using relative command would be less resource intensive that using the full http address.

      Can you suggest the file name we can use to do this please, or is it simply the Wp default wp-cron.php ?

      Thanks

    2. I am having problems getting this to work. its not syncing the rss feed and posting anything. can someone help me?

      im running WordPress 3.0.5

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>