Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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
- Change the default value of
system.cron:threshold.autorun
to 0. - Add a config file to Standard profile that configures
system.cron:threshold.autorun
with the current default value.
Comment | File | Size | Author |
---|---|---|---|
#2 | 1934700-1-automated-cron-runs-standard-profile.patch | 653 bytes | nick_schuch |
#4 | 1934700-4-automated-cron-runs-standard-profile.patch | 692 bytes | nick_schuch |
#4 | 1934700-4-automated-cron-runs-standard-profile.interdiff.txt | 404 bytes | nick_schuch |
Comments
Comment #1
sunComment #2
nick_schuch CreditAttribution: nick_schuch commentedInitial attempt. Let's see what the bot does.
Comment #3
sunYay, 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:
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 :)
Comment #4
nick_schuch CreditAttribution: nick_schuch commentedIt was a trap! haha
I completely agree. Definitely needs some investigation. Here's a new patch.
Comment #5
sunYay! Thanks! :)
Comment #6
webchickCommitted and pushed to 8.x. Thanks!
Comment #8
swentel CreditAttribution: swentel commentedCan anyone confirm that this actually works, see #1958770: Cron default should never be "Never"
Comment #9
Dave ReidThis does not actually work at all.
Comment #10
markpavlitski CreditAttribution: markpavlitski commentedThis will be fixed when #1986090: Profile config does not overwrite module default config on install (system.cron.yml) gets in.
Comment #11
markpavlitski CreditAttribution: markpavlitski commentedComment #12
sunThat's in now, so reverting status to closed.