From 1f2b01ed8ee1a7934be8d4ea4e7bfc2980910e3a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 3 Dec 2005 15:25:40 +0100 Subject: [PATCH] update_feeds.php for CLI --- config.php-dist | 3 +++ functions.php | 5 ++--- update_feeds.php | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 update_feeds.php diff --git a/config.php-dist b/config.php-dist index 56a554106..00b47bfcc 100644 --- a/config.php-dist +++ b/config.php-dist @@ -39,6 +39,9 @@ // */30 * * * * /usr/bin/wget -O /dev/null -T 600 "http://www.your-site.xxx/tt-rss/backend.php?op=globalUpdateFeeds&daemon=1" // + // The alternative approach is to run update_feeds.php from your crontab + // with command line PHP interpreter. + define('SMART_RPC_COUNTERS', true); // If enabled, stores feed counter information on the server side and sends // only diffs to the client. In the nutshell, it saves your bandwidth and diff --git a/functions.php b/functions.php index 6b6060573..ba80bab94 100644 --- a/functions.php +++ b/functions.php @@ -1,5 +1,4 @@ ($upd_intl * 60))) { - update_rss_feed($link, $line["feed_url"], $line["id"]); + update_rss_feed($link, $line["feed_url"], $line["id"], $force_daemon); } } diff --git a/update_feeds.php b/update_feeds.php new file mode 100644 index 000000000..38940896f --- /dev/null +++ b/update_feeds.php @@ -0,0 +1,38 @@ +#!/usr/bin/php4 + +