Sometimes (especially for a site youve migrated lots of content) you'd like to be able to run cron every 5 minutes or so to index the search. Another use case I'm finding is with using the linkchecker module for a large site (7k nodes, 30k links) - currently this is taking days to index. This patch adds extra options for 5, 10 and 30 minutes.

Perhaps 3 extra options is too many, maybe 5 and 15 minutes would suffice.

CommentFileSizeAuthor
#6 1310260-cron_time_list_patch.patch742 bytesjhr
cron-options.patch721 bytesnirbhasa
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

madeby’s picture

Is this possible in any way on D7?

nirbhasa’s picture

I think that patch should apply equally well to D7, if you want to try. However the policy is to commit to D8 dev first.

Bojhan’s picture

Why dont you just make a module for this? Or do it in apache, I dont really get when you are doing something this advanced - core would need to support in it.

jhr’s picture

Status: Needs work » Needs review

@Bojhan... Another module should be written to duplicate cron's functionality?

I like this patch because it adds shorter times, my case is checking for feeds.

Maybe I'm misunderstanding how core cron is supposed to work, but core updates has the option to check for runs daily or weekly.
admin/reports/updates/settings

I think if any modules run on every cron run then that's their bad functionality.

Status: Needs review » Needs work

The last submitted patch, cron-options.patch, failed testing.

jhr’s picture

Another Patch adding 5,10,15,30mins

jhr’s picture

Status: Needs work » Needs review

... and a status changed

bagvendt’s picture

Okay first time reviewing a patch here so go easy on me :)

Applied the patch and everything seems to be in order.

My only note would be that according to: this link the patch seems to reveal a problem in the cron module.
I am thinking what if someone wanted to have a cron every 27th minute or every third minute. My point -> maybe the cron intervals should be configurable in some other module.

jhr’s picture

If I understand Drupal cron & linux cron correctly, I think ideally that would be done by the system(linux) cron, and Drupal's cron would be available to run by setting a time interval shorter than an hour.

ex(if my cron-fu doesn't fail me):

27 * * * * wget -O - -q -t 1 site.com/cron.php?cron_key=
and/or
3 * * * * wget -O - -q -t 1  site.com/cron.php?

Then Drupal's cron every 45 mins.

Anonymous’s picture

I really believe that it's a bad logic you're applying.

Who will determine the perfect balance? What should the minimum soft-cron interval be? I say let we keep the current intervals or let the user set his own, while supplying better documentation of what cron is, and why it really should be run by a unix cron job instead.

Lets not make a halfway change, lets fix this the right way, so that we don't have this resurface when someone wants a 3 min interval, or perhaps a 15 min one.

bagvendt’s picture

I have added a feature request over here suggesting an alternative approach to resolve this issue.

#1679660: Add link to cron tutorial on drupal.org

valthebald’s picture

Status: Needs review » Active

+1 to #11

elvis2’s picture

Here is another method, using batching: http://drupal.org/node/1679660#comment-7432824

valthebald’s picture

@elvis2: #1679660: Add link to cron tutorial on drupal.org can provide a way of manual processing of indexing or other time-consuming operation using web UI, not a way of recurring, scheduled tasks, automatically run by the system

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)

#11 appears to have been committed. And with no movement in 10+ years wonder if this is still a desired feature?

kikecastillo’s picture

I would love this feature to be part of core. I understand 1 hour is enough and it should be per default but why not allow more options?

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.