[wp-trac] [WordPress Trac] #60645: Add pre-fire hook for cron
WordPress Trac
noreply at wordpress.org
Tue Feb 27 12:38:20 UTC 2024
#60645: Add pre-fire hook for cron
-------------------------+-----------------------------
Reporter: kkmuffme | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Cron API | Version: trunk
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
Followup to https://core.trac.wordpress.org/ticket/56048
https://core.trac.wordpress.org/changeset/54258
This adds an additional hook before every cron event to allow for custom
code to run before a cron hook
Use cases:
- custom error checking (e.g. if a cron even has no callbacks,...)
- load libraries/functions/classes that are only needed for a specific
number of cron events and would otherwise slow down the site/cron - this
hook allows you to handle multiple at once which is useful for e.g.
dynamic hook names or for cases where you need to run it for a number of
hooks (instead of adding 100 add_action with same callback)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60645>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list