Problem

  • After installing Drupal with the Minimal profile, automated cron runs were automatically enabled.

Details

  • Automated cron runs (via JS/Ajax) only exist for low-end sites on shared hosting and such, which may not have access to a real crontab.
  • The feature should be an opt-in, instead of an opt-out.

Proposed solution

  1. Change the default value of system.cron:threshold.autorun to 0.
  2. Add a config file to Standard profile that configures system.cron:threshold.autorun with the current default value.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sun’s picture

Title: Automated cron runs should be enabled by default for Standard profile » Automated cron runs should only be enabled by default for Standard profile
nick_schuch’s picture

Assigned: Unassigned » nick_schuch
Status: Active » Needs review
FileSize
653 bytes

Initial attempt. Let's see what the bot does.

sun’s picture

Issue tags: +Configuration system

Yay, thanks! :)

The interesting part here is that you left out the other keys/settings of system.cron. — And when I created this issue, I actually thought of that already... and kinda hoped we'd run into that trap :-)

The current override mechanism for config files provided by installation profiles takes the entire file as a replacement/override for the original. It does not merge it with the original.

However, I think it would actually be great if installation profiles would be able to do that. In essence, this user story:

As an installation profile author, I want to override specific settings of interest of a module settings file only. Other/non-overridden settings should use their defaults.

For now and for this issue, we want to copy the entire file and adjust the single setting only. However, we should create a separate Configuration system issue to allow partial overrides.

Done so: #1934758: Allow installation profiles to partially override module default configuration settings :)

nick_schuch’s picture

It was a trap! haha

I completely agree. Definitely needs some investigation. Here's a new patch.

sun’s picture

Status: Needs review » Reviewed & tested by the community

Yay! Thanks! :)

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

swentel’s picture

Can anyone confirm that this actually works, see #1958770: Cron default should never be "Never"

Dave Reid’s picture

This does not actually work at all.

markpavlitski’s picture

Assigned: nick_schuch » Unassigned
Issue summary: View changes
Status: Closed (fixed) » Postponed
markpavlitski’s picture

sun’s picture

Status: Postponed » Closed (fixed)

That's in now, so reverting status to closed.