Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If you want to process the queue outside of cron, and be able to stop it independent on cron, you have to return 'skip on cron' option as TRUE at hook_cron_queue_info.
This patch:
- Adds a checkbox in the admin page. Previous text from above status description is mostly carried over to checkbox description.
- Returns 'skip on cron' value on hook_cron_queue_info() accordingly.
- Adds setting uninstall.
Queue processing defaults to happen on cron as previously if left unconfigured to preserve current behaviour.
Setting is named 'queue_mail_send_on_cron' to match UI. I just negate it in the hook_cron_queue_info().
Comment | File | Size | Author |
---|---|---|---|
#2 | queue_mail--2447625--add_configurable_skip_on_cron_option--1.patch | 2.33 KB | amontero |
Comments
Comment #1
Steven Jones CreditAttribution: Steven Jones commentedOh yes, great idea!
Comment #2
amonteroComment #4
Steven Jones CreditAttribution: Steven Jones commentedThanks so much for the feature idea and the patch.