Problem/Motivation

When using ultimate_cron module, the frequency can be configured, but there is an additional minimum of 15 minutes delay because of the cron frequency in the hook_cron implementation. Ultimate cron gives the possibility to trigger manually cron jobs, but this will only work if the cron frequency in the search_api_synonym settings has been passed.

Proposed resolution

It's pretty common to not have any cron frequency conditions in the hook_cron, so I would like to propose to remove it.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

bojan_dev created an issue. See original summary.

bojan_dev’s picture

Status: Active » Needs review
aaron.ferris’s picture

StatusFileSize
new8.6 KB

+1 for this change. Attaching a patch from the MR.

aaron.ferris’s picture

Needs some thought on how we approach this, given this module is already out in the wild. Perhaps we need this behind some sort of toggle, so that the module will continue to behave as it currently is (cron settings from config) but can be overridden with a checkbox.

steinmb’s picture

+1 from me. Perhaps make the change to only 3.x, avoiding potential breaking sites with exiting functionality?

aaron.ferris’s picture

Version: 2.0.x-dev » 3.0.x-dev

aaron.ferris changed the visibility of the branch 3471724-remove-cron-frequency to hidden.

aaron.ferris’s picture

Ive decided to take a slightly different approach to this, by adding another option in the interval select.

This should give the best of multiple worlds. We now have

1. Never - self explanatory
2. List of intervals - the way the module has historically worked
3. Every cron run - which leaves the cron configuration open, but will ignore any time based interval, so that it can be used with Ultimate Cron and the likes

Feedback/testing welcome.

brandonlira’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new87.95 KB
new19.98 KB

Hi @aaron.ferris,

I manually tested MR !22.

  • Selected "Every Cron run" in the configuration form.
  • Triggered cron multiple times manually.
  • Confirmed that the synonym export was executed on each cron run.

Verified that the following messages appeared in the logs:

  • Executing export
  • Export for English complete

Confirmed expected behaviour without requiring a time-based interval.
Looks good to me.
Thank you!

aaron.ferris’s picture

Status: Reviewed & tested by the community » Fixed

  • aaron.ferris committed 19726ecc on 3.0.x
    Issue #3471724: add option for bypass export frequency interval
    

Status: Fixed » Closed (fixed)

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