humanmade / Cavalcade

A better wp-cron. Horizontally scalable, works perfectly with multisite.
https://engineering.hmn.md/projects/cavalcade/
Other
512 stars 46 forks source link

Bootstrap Cron filters prior to `plugins_loaded` firing #83

Closed peterwilsoncc closed 3 years ago

peterwilsoncc commented 5 years ago

The cron array may be accessed prior to the plugins_loaded action firing, the most likely candidates are:

Running Connector\bootstrap() as the plugin is required will filter the cron array as soon as the code is available.

On the downside, the is_installed() check would probably need to be included in the filters but as it's cached, this shouldn't cause too much of a problem.

peterwilsoncc commented 4 years ago

Related: WP Core ticket #49824 in 5.4 bumps the priority on this a little as a cron job is scheduled prior to the plugins_loaded hook by the site health component.

cc @roborourke

archon810 commented 3 years ago

Any updates?

archon810 commented 3 years ago

Related: https://github.com/humanmade/Cavalcade/issues/101.

roborourke commented 3 years ago

No updates yet, probably because we don't use the site health stuff on our hosting it hasn't really come up as an issue for us.

So I guess the best we can do is just to run the initial bootstrap function immediately when the plugin file is loaded.

roborourke commented 3 years ago

Fix released in 2.0.1