Documentation

Updating Feeds

Updating your feeds is a crucial part of using any feed reader. Without updating your feeds frequently, you'd just be reading the same news over and over again!

Lilina offers several ways to update your feeds. The method used to update can be controlled by the "update on" setting. Currently, the methods are "page view", or "manual".

Page View

Updating on page view is the default method offered by Lilina, and works well for a small amount of feeds. With this method, feeds are checked while the page is loading (every hour). However, this can increase your load time, and may cause your page to error out.

This has been removed from newer versions of Lilina and this section will be removed as soon as I get around to it. :)

Manual

The newest method of updating your feeds is to do so manually. Lilina offers a built-in script to do this. The URL to access this is listed under Manual Updating on your settings page, and is usually http://example.com/lilina/?method=update (assuming you installed to http://example.com/lilina/ ).

This page can be accessed in your browser by this URL, and can be set up as a cron job.

Cron

cron is a daemon (background program) to run a certain task at scheduled intervals. Linux, Unix and Mac usually have cron installed by default. Windows servers can use Scheduled Tasks.

In the following example, the crontab command shown below will activate the cron tasks automatically on the hour:

0 * * * * wget -O - -q -t 1 http://example.com/lilina/?method=update\&cron

In the above sample, the 0 * * * * represents when the task should happen. The first figure represents minutes – in this case, on the "zero" minute, or top of the hour. (If the number were, say, 10, then the action would take place at 10 minutes past the hour.) The other figures represent, respectively, hour, day, month and day of the week. A * is a wildcard, meaning "every time."

cron also supports operators such as 0,30 which will run the cron job every half hour (on the "zero" minute, and on the thirty "minute").

The cron command example above means "ping http://example.com/lilina/?method=update&cron at the zero minute on every hour of every day of every month of every day of the week."

This can be set to run more often, by changing the time. Admin's Choice has a good overview of how to set up a cron job, and how cron works.

Setting up the cron job

A cron job is created by first setting up a "crontab". A crontab is a set of instructions contained in a text file. This file can be created and edited via the command line, or through cPanel/Plesk. Ask your hosting company for details if you are using one of these control panels.

To edit a crontab through the command line, type:

crontab -e

Add **ONE** of the following lines:

0 * * * *  /usr/bin/lynx -source http://example.com/lilina/?method=update\&cron
0 * * * * /usr/bin/wget -O - -q -t 1 http://example.com/lilina/?method=update\&cron
0 * * * * curl --silent --compressed http://example.com/lilina/?method=update\&cron

This will update your items every hour, on the hour. See the previous section for notes on how to change the time.

Thanks to Drupal's guide for inspiration for the cron section of this document.