Page 1 of 1

Cron update only seems to work after I log in???

Posted: 06 Sep 2016, 06:42
by griever
I have a cron job (update.php --feeds) scheduled to run every 15 minutes, and it works fine most of the time.

The issue is that it seems to stop updating if I don't log in to the web interface for a while.

I didn't login to the web interface for a couple of months, and despite the job running regularly, none of the feeds seemed to be flagged for updating until I logged in again today.

I have the cron job outputting to a log file. Here's the log entry from the last update before today that had any feeds scheduled to update (from the 24th of July)...

[03:15:02/654703] Lock: update.lock
[03:15:02/654703] Scheduled 1 feeds to update...
[03:15:02/654703] Base feed: http://xkcd.com/atom.xml
[03:15:02/654703] => 2016-07-24 02:15:02, 3 1
[03:15:02/654703] 0.4983 (sec)
[03:15:02/654703] Processed 1 feeds in 0.4992 (sec), 0.4992 (sec/feed avg)
[03:15:02/654703] Sending digests, batch of max 15 users, headline limit = 1000
[03:15:02/654703] All done.
[03:15:02/654703] cache/simplepie: removed 0 files.
[03:15:02/654703] cache/images: removed 0 files.
[03:15:02/654703] cache/export: removed 0 files.
[03:15:02/654703] cache/upload: removed 0 files.
[03:15:02/654703] Removed 0 old lock files.
[03:15:02/654703] Removing old error log entries...
[03:15:02/654703] Feedbrowser updated, 0 feeds processed.
[03:15:02/654703] Purged 0 orphaned posts.
[03:15:02/654703] Cleaned 0 cached tags.
X-Powered-By: PHP/5.4.45
Content-type: text/html


Then there is thousands of log entries (every 15 minutes since the 24th of July) with 0 scheduled feeds to update...

[01:15:01/631509] Lock: update.lock
[01:15:01/631509] Scheduled 0 feeds to update...
[01:15:01/631509] Sending digests, batch of max 15 users, headline limit = 1000
[01:15:01/631509] All done.
[01:15:01/631509] cache/simplepie: removed 0 files.
[01:15:01/631509] cache/images: removed 0 files.
[01:15:01/631509] cache/export: removed 0 files.
[01:15:01/631509] cache/upload: removed 0 files.
[01:15:01/631509] Removed 0 old lock files.
[01:15:01/631509] Removing old error log entries...
[01:15:01/631509] Feedbrowser updated, 0 feeds processed.
[01:15:01/631509] Purged 0 orphaned posts.
[01:15:01/631509] Cleaned 0 cached tags.
X-Powered-By: PHP/5.4.45
Content-type: text/html


Then after I logged into the web interface today, I see an entry with one feed to update...

[01:45:01/662744] Lock: update.lock
[01:45:01/662744] Scheduled 1 feeds to update...
[01:45:01/662744] Base feed: http://xkcd.com/atom.xml
[01:45:01/662744] => 2016-09-06 01:00:29, 3 1
[01:45:02/662744] 0.0960 (sec)
[01:45:02/662744] Processed 1 feeds in 0.0972 (sec), 0.0972 (sec/feed avg)
[01:45:02/662744] Sending digests, batch of max 15 users, headline limit = 1000
[01:45:02/662744] All done.
[01:45:02/662744] cache/simplepie: removed 0 files.
[01:45:02/662744] cache/images: removed 0 files.
[01:45:02/662744] cache/export: removed 0 files.
[01:45:02/662744] cache/upload: removed 0 files.
[01:45:02/662744] Removed 0 old lock files.
[01:45:02/662744] Removing old error log entries...
[01:45:02/662744] Feedbrowser updated, 0 feeds processed.
[01:45:02/662744] Purged 0 orphaned posts.
[01:45:02/662744] Cleaned 0 cached tags.


Am I doing something wrong?

Re: Cron update only seems to work after I log in???

Posted: 06 Sep 2016, 07:09
by JustAMacUser
griever wrote:Am I doing something wrong?


Yup. This:

I didn't login to the web interface for a couple of months


If you don't log in, you become an inactive user and your feeds stop updating. The default duration is 30 days. You can disable such checks by adding the following to your config.php file:

Code: Select all

define('DAEMON_UPDATE_LOGIN_LIMIT', 0);

Re: Cron update only seems to work after I log in???

Posted: 06 Sep 2016, 16:11
by griever
Thanks!

I'll give that a go and test it out.

Might take me a while to test though, I'll need to not login again for 30 days!

Cheers.