By default update inteval of RSS aggregator in Core aggregator module start form 15 min, I mean 15 min is minimum value,

enter image description here

But I need update RSS aggregator shorter than 15 min,and update my feed each 2,5,10 minute too,

How can I set Update interval to what I required?

one solution is using alternative module like feeds module but it is not stable yet.


The update interval values for an Aggregator Feed is hardcoded into the Entity definition for the refresh field. You'll need to alter the definition to allow different values.

In a custom module, you can evoke hook_entity_base_field_info_alter() to alter the Feed definition to accept shorter intervals:

function MYMODULE_entity_base_field_info_alter(&$fields, $entity_type) {
  if ($entity_type->get('id') == 'aggregator_feed') {
    $definition = $fields['refresh']->getItemDefinition();
    $intervals = $definition->getSetting('allowed_values');
    $intervals = array(
      120 => '2 min',
      300 => '5 min',
      600 => '10 min',
    ) + $intervals;
    $intervals = $definition->setSetting('allowed_values', $intervals);

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.