Manual Feed Refresh
+Next to the “Your Unread Items” heading on the main page, there is a link labeled “Refresh All + Feeds”. Clicking this link will reload the main page once the feeds have been refreshed. Depending on the + number and size of feeds, this may take a bit of time; each feed is refreshed individually. +
Automatic Refreshing
+The refresh
utility script will perform this refresh from the CLI. As it runs, it will list the
+ feeds as it processes them, and if it encounters any errors, that is noted as well. This process can be
+ automated via cron
on Linux or Mac systems. This is most easily implemented by writing a small
+ shell script to provide some environment settings, then telling cron
to run that script.
+
+#!/bin/bash +exec 1> >(logger -t feed-reader-central) 2>&1 +cd /path/to/frc +php-cli util/refresh.php all+
Save this (frc-refresh.sh
might be a good name) and be sure it is executable
+ (chmod +x ./frc-refresh.sh
). Before we put it in crontab, though, let’s understand what each
+ line does:
+
-
+
- Line 1 tells the operating system to use the
bash
shell. + - Line 2 directs all output to the system log (
/var/log/syslog
), labeling each entry with +feed-reader-central
. This lets you review the output for its runs in a log that is already + maintained and rotated by the operating system. + - Line 3 changes the current directory to the one where Feed Reader Central is installed; modify it for where
+ you have installed it. Since we are setting up for a CLI execution, this should place
+ us one directory up from
/public
. + - Line 4 executes the refresh script. +
Finally, we are ready to add this to our crontab. Enter crontab -e
to edit the file, then add a row
+ at the bottom that looks like this:
+
+0 */6 * * * /path/to/job/frc-refresh.sh+
The items before the path specify when it should run. This example will run at the top of the hour every six + hours. Crontab schedules can be tricky to create; a full treatment is outside the scope of this documentation. + However, this site + lets you put values in each position and it translates that to words; this lets you see if what you put is what + you meant. +
This should not require many resources; the majority of its time will be spent waiting for the websites to return
+ their feeds so it can process them. However, if you want it to yield to everything else happening on the server,
+ add nice -n 1
(with a trailing space) before the path to the script.
+