rebuilding schedule information in job_scheduler_rebuild_all() is unreliable

Created on 21 December 2011, over 13 years ago
Updated 9 July 2025, 23 days ago

If I understand correctly, job_scheduler_rebuild_all() is called when any module is enabled or disabled. It sets a flag by means of a variable_set(), and the next time cron is run, this flag ensures that job_scheduler_rebuild_scheduler() is called.

It seems to me that having the only way into this process be a module status change is not enough.

For instance, what if a developer changes the period of a schedule in their hook_cron_job_scheduler_info()?
Or if a (hypothetical) schedule UI module dynamically returns schedules in hook_cron_job_scheduler_info(), which change according to UI settings?

It seems to me that this module needs to be able to react to cache clears.

🐛 Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024