2

I have several feeds setup in the Feed Aggregator ( admin/config/services/aggregator ) in Drupal 7.

I know that my cron job is running regularly - by checking admin/reports/dblog

But the when I look at the feeds list, the "LAST UPDATE" for each of them shows dates from over a week ago. If I do the update manually, i.e. click update items then the feed is refreshed and new items are available.

But why is the cron job not triggering the updates?

If you can't provide a reason then what approaches to debugging can I use to find and solve the root cause?

I have searched this site already and not found an existing question about this problem. I did find RSS feed not updating using feeds module but that question is about the Feeds module - which I don't use.

  • No responses. Disappointing. Looks like I'm going to have to solve this myself. I've got Komodo IDE 7 so I may consider debugging the installation on that. – therobyouknow Apr 18 '12 at 8:07
  • 1
    Over a year later, and still no response! – Doug Aug 5 '13 at 21:22
  • +1 yes, thanks Doug! I have an answer below that hopefully solves the issue for others with the same problem – therobyouknow Apr 22 '16 at 9:06
2

Yup, trying to solve my own question (again):

Similar problem here: http://drupal.org/node/1115978

and the possible solution here: http://drupal.org/node/1023190

Update

The above solution was about a database fix to do with feeds that have more than one category.

When I applied to patch I was informed that this was already in the version of aggregator.

So in summary the solution I gave above had already been applied.

However, another avenue to explore is cron job time out. In my situation I have a lot of feeds so it could be taking the job invoked by the cron a long time to update all of them.

Here is another possible solution to extend the time alloted to running a job triggered by cron, a cron job:

http://teqsnacks.com/2007/07/07/drupal-when-cron-jobs-do-not-complete-and-cron-jobs-tips/

To quote:

Go to your settings.php file (under sites/default or wherever it is). At the bottom of it you will see a list of ini_set commands. Add the following to the list:

ini_set("max_execution_time", 60);

The number at the end is the number of seconds a program can run before timing out. Setting it to 0 means "never timeout" which you should use very carefully, like on a development site where you have control over the server.

Update 2 - and likely solution and root cause

The cause of the problem likely stems from a corrupt database causing errors when the cron job is run. Details and remedy here:

http://drupal.org/node/1596220

Update 3

After following the above instructions you may still see the feeds not updating. Further things to consider:

  • Clear all caches

  • Check your site logs for cron job running successfully and new feed items being imported from the aggregator

  • If you are using a View (of type aggregator) to process the feed then you would probably need to sort the feed by descending so that the latest feed items appear first. To do this you will need to define your own date format (check the PHP option) for the Aggregator Feed Item Timestamp in the View sort criteria, so that the date is big endian i.e. YYYY-MM-DD hh:mm:ss. The current date formats offered aren't purely big endian and the sort won't work properly e.g. because day comes before month.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.