UpdatingFeeds with Cron

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
User avatar
sancho1234
Bear Rating Trainee
Bear Rating Trainee
Posts: 44
Joined: 30 Mar 2013, 04:19
Location: Hungary
Contact:

UpdatingFeeds with Cron

Postby sancho1234 » 03 Apr 2013, 00:32

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:

User avatar
erikbennett
Bear Rating Trainee
Bear Rating Trainee
Posts: 20
Joined: 17 Mar 2013, 03:08
Location: Seattle, WA

Re: UpdatingFeeds with Cron

Postby erikbennett » 03 Apr 2013, 00:36

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.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: UpdatingFeeds with Cron

Postby fox » 03 Apr 2013, 00:38

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

User avatar
sancho1234
Bear Rating Trainee
Bear Rating Trainee
Posts: 44
Joined: 30 Mar 2013, 04:19
Location: Hungary
Contact:

Re: UpdatingFeeds with Cron

Postby sancho1234 » 03 Apr 2013, 01:20

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:

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: UpdatingFeeds with Cron

Postby sleeper_service » 03 Apr 2013, 04:01

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.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: UpdatingFeeds with Cron

Postby fox » 03 Apr 2013, 09:15

CGI has argc/argv disabled, so it will technically run, but you won't be able to pass command line arguments, e.g. --feeds.

User avatar
sancho1234
Bear Rating Trainee
Bear Rating Trainee
Posts: 44
Joined: 30 Mar 2013, 04:19
Location: Hungary
Contact:

Re: UpdatingFeeds with Cron

Postby sancho1234 » 03 Apr 2013, 13:51

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

User avatar
sancho1234
Bear Rating Trainee
Bear Rating Trainee
Posts: 44
Joined: 30 Mar 2013, 04:19
Location: Hungary
Contact:

Re: UpdatingFeeds with Cron

Postby sancho1234 » 03 Apr 2013, 13:51

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. :?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: UpdatingFeeds with Cron

Postby fox » 03 Apr 2013, 13:53

Yeah this is most probably the right binary, not the cgi one.

User avatar
sancho1234
Bear Rating Trainee
Bear Rating Trainee
Posts: 44
Joined: 30 Mar 2013, 04:19
Location: Hungary
Contact:

Re: UpdatingFeeds with Cron

Postby sancho1234 » 03 Apr 2013, 14:00

fox wrote:Yeah this is most probably the right binary, not the cgi one.

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


Return to “Support”

Who is online

Users browsing this forum: No registered users and 4 guests