Updating Feeds

This page explains various methods to update feeds with tt-rss and their caveats.

1. Synchronous update.

See ObsoleteUpdateMethods.

2. Periodical updating from crontab, using wget or GET or some other command line HTTP client. Use this method ONLY if you don't have access to PHP command line interpreter (e.g. /usr/bin/php) because Apache usually restricts maximum time allowed for script execution so unless you change or disable the restriction most probably you will have problems with updating.

  • Add the following as your crontab command:
/usr/bin/wget --quiet --output-document=/dev/null 
    "http://YOUR_SITE/TTRSS_LOCATION/backend.php?op=globalUpdateFeeds&daemon=1" 

Full example (see man 5 crontab for more information on the syntax):

*/30 * * * * /usr/bin/wget --output-document=/dev/null --timeout=600 "http://www.your-site.xxx/tt-rss/backend.php?op=globalUpdateFeeds&daemon=1" 

3. Periodical updating from crontab, using script. Use this if you have access to PHP command line interpreter, but can't run resident background processes, e.g. your hosting doesn't allow that.

  • Call update-feeds.php from crontab.

Full example (note that you have to change into tt-rss directory before calling update_feeds.php):

*/30 * * * * cd /home/user/public_html/tt-rss && /usr/bin/php /home/user/public_html/tt-rss/update_feeds.php >/dev/null 2>&1

4. Background update daemon (optionally with init.d script). This is the recommended way to update feeds. Please use it if you have access to PHP CLI interpreter and can run background processes.

Note: Multi-process update daemon is available since 1.2.20.

Running daemon without init.d

Run update_daemon.php (single-process) or update_daemon2.php (multi-process) using PHP cli interpreter.

$ php ./update_daemon.php

The daemon doesn't itself daemonize (e.g. detach from the terminal), but you can force it into background using external utility like start-stop-daemon in Debian. Or just run it under screen.

Running daemon with init.d (provided scripts might not run under your distribution of choice)

Login as root on your Tiny Tiny RSS server :

* Enable ENABLE_UPDATE_DAEMON in config.php. * Install the init.d script configuration file :
/usr/bin/wget http://tt-rss.org/redmine/attachments/56/tt-rss.default \
    --output-document=/etc/default/tt-rss
* Install the init.d script and make it runnable :
/usr/bin/wget http://tt-rss.org/redmine/attachments/57/tt-rss.initd \
    --output-document=/etc/init.d/tt-rss
/bin/chmod +x /etc/init.d/tt-rss
* If you want Tiny Tiny RSS update daemon to start when you computer start :
/usr/sbin/update-rc.d tt-rss defaults
Once all this done, you can use this command line to start the update daemon :
/etc/init.d/tt-rss start

And this command line to stop the update daemon :
/etc/init.d/tt-rss stop

tt-rss.initd - Tiny Tiny RSS init.d script (3.8 KB) Pierre-Yves Landuré -, 01/23/2008 11:33 PM

tt-rss.default - Tiny Tiny RSS init.d script configuration file (384 Bytes) Pierre-Yves Landuré -, 01/23/2008 11:34 PM

Also available in: HTML TXT