Cache flush resets cron_frequency for managed job entities
Overview
Steps to reproduce:
- Install cronplus
v2.4.0
- Install any extension with a managed job entity (e.g. Civirules)
- Go to Administer >> System Settings >> Scheduled Jobs and change cron frequency for the job provided by that extension
- Run cache cleanup
- Check that cron frequency reverted to default
Background
Cache cleaning runs CRM_Core_ManagedEntities::reconcile()
which updates managed entities. This later triggers cronplus_civicrm_postSave_civicrm_job()
for every managed job.
Since !10 (merged) if a cron frequency is not present in $_POST
- which only happens when we update cron frequency through the UI (as in step # 3 above) - it calculates the default cron frequency and overwrites the configured setting.