Page 1 of 1

UpdatingFeeds with Cron

Posted: 03 Apr 2013, 00:32
by sancho1234
My cron is working but feeds doesn't updating with ttrss v1.7.5 (Mar 23, 2013). (But an other rss server cron by Selfoss is continuously updated.)

It's okay:

Code: Select all

$ grep CRON /var/log/syslog
.
.
.
Apr  2 22:10:01 raspberrypi /USR/SBIN/CRON[12956]: (pi) CMD (cd /var/www/ttrss && /usr/bin/php /var/www/ttrss/update.php -feeds >/dev/null 2>&1)


The manual running is okay:

Code: Select all

$ /usr/bin/php /var/www/ttrss/update.php --feeds
[20:12:25/12960] Scheduled 100 feeds to update...
[20:12:25/12960] Expiring cache/simplepie
[20:12:25/12960] Removed 0 files.
[20:12:25/12960] Expiring cache/images
[20:12:25/12960] Removed 0 files.
[20:12:25/12960] Expiring cache/export
[20:12:25/12960] Removed 0 files.
[20:12:25/12960] Removing old lock files...
[20:12:25/12960] Removed 0 files.
[20:12:25/12960] Feed: http://...
.
.
.
[20:20:05/12960] Sending digests, batch of max 15 users, headline limit = 1000
[20:20:05/12960] All done.
[20:20:10/12960] Feedbrowser updated, 152 feeds processed.
[20:20:16/12960] Purged 0 orphaned posts.
[20:20:17/12960] Cleaned 0 cached tags.


CGI PHP is okay:

Code: Select all

which php
/usr/bin/php
whereis php
php: /usr/bin/php /usr/bin/X11/php /usr/share/man/man1/php.1.gz


The corn (5 mins for fast testing, I tried it with */30 also):

Code: Select all

$ crontab -l
*/5 * * * * cd /var/www/ttrss && /usr/bin/php /var/www/ttrss/update.php -feeds >/dev/null 2>&1


I did restart the cron and lighttpd server:

Code: Select all

sudo service cron restart
sudo service lighttpd restart


My HTTP headers:

Code: Select all

/var/www/ttrss $ /usr/bin/php5-cgi ./update.php
X-Powered-By: PHP/5.4.4-14
Content-Language: auto
Content-Type: text/html; charset=


This is my server in my home, with DynDNS (Raspberry Pi "B" 512MB, Debian, MYSQL, Lighttpd, ...).

If I run the feed update then the CPU is working on 100%, but if I waiting for the cron then I don't see on CPU usage nothing.

I read the wiki/faq: http://tt-rss.org/redmine/projects/tt-r ... atingFeeds
I found two blogs with similar settings with similar configurations and they are used successfully it (with Lighttpd: http://goo.gl/xMeJZ, and with Nginx: http://goo.gl/ZLzpo).

Have you got any idea why can't use it on my server? :oops:

Re: UpdatingFeeds with Cron

Posted: 03 Apr 2013, 00:36
by erikbennett
Change -feeds to --feeds. That's new in 1.7.5

Also, you might want to add --quiet, that'll ratchet down the chatter, though the ".." emails won't be fixed until 1.7.6 is out.

Re: UpdatingFeeds with Cron

Posted: 03 Apr 2013, 00:38
by fox
Also stop using the fucking cgi binary as specifically stated in the wiki page you claimed to have read.

Re: UpdatingFeeds with Cron

Posted: 03 Apr 2013, 01:20
by sancho1234
erikbennett wrote:Change -feeds to --feeds. That's new in 1.7.5

Also, you might want to add --quiet, that'll ratchet down the chatter, though the ".." emails won't be fixed until 1.7.6 is out.

1 millions thank you! :) The CPU is working hard.

fox wrote:Also stop using the fucking cgi binary as specifically stated in the wiki page you claimed to have read.


Sorry, I'm very biginner. I can't see the html header. You are the Master. :wink:

However, this method work... :roll:

Re: UpdatingFeeds with Cron

Posted: 03 Apr 2013, 04:01
by sleeper_service
sancho1234 wrote:
fox wrote:Also stop using the fucking cgi binary as specifically stated in the wiki page you claimed to have read.


Sorry, I'm very biginner. I can't see the html header. You are the Master. :wink:

However, this method work... :roll:


from the wiki page: Do not try to run cronjobs with a PHP CGI binary, it's not going to work. If you see HTTP headers being displayed when you run php ./update.php you are using an incorrect binary.

Re: UpdatingFeeds with Cron

Posted: 03 Apr 2013, 09:15
by fox
CGI has argc/argv disabled, so it will technically run, but you won't be able to pass command line arguments, e.g. --feeds.

Re: UpdatingFeeds with Cron

Posted: 03 Apr 2013, 13:51
by sancho1234
sleeper_service wrote:
sancho1234 wrote:
fox wrote:Also stop using the fucking cgi binary as specifically stated in the wiki page you claimed to have read.


Sorry, I'm very biginner. I can't see the html header. You are the Master. :wink:

However, this method work... :roll:


from the wiki page: Do not try to run cronjobs with a PHP CGI binary, it's not going to work. If you see HTTP headers being displayed when you run php ./update.php you are using an incorrect binary.

Sorry, but I don't see the html header, only the help of update:
Image

Re: UpdatingFeeds with Cron

Posted: 03 Apr 2013, 13:51
by sancho1234
fox wrote:CGI has argc/argv disabled, so it will technically run, but you won't be able to pass command line arguments, e.g. --feeds.

I don't know why that is, but it's the way it works for me since last night. :?

Re: UpdatingFeeds with Cron

Posted: 03 Apr 2013, 13:53
by fox
Yeah this is most probably the right binary, not the cgi one.

Re: UpdatingFeeds with Cron

Posted: 03 Apr 2013, 14:00
by sancho1234
fox wrote:Yeah this is most probably the right binary, not the cgi one.

"We Happy? Vincent?"
Thank you for your patient! :D