[wp-trac] [WordPress Trac] #63858: Trigger the wp_cron action from the shutdown hook instead of the init hook to reduce TTFB (⏱️ Time To First Byte) and improve performance 📈
WordPress Trac
noreply at wordpress.org
Sun Oct 12 21:40:25 UTC 2025
#63858: Trigger the wp_cron action from the shutdown hook instead of the init hook
to reduce TTFB (⏱️ Time To First Byte) and improve performance 📈
-------------------------------------------------+-------------------------
Reporter: pmbaldha | Owner:
| westonruter
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.9
Component: Cron API | Version: 2.1
Severity: normal | Resolution: fixed
Keywords: has-patch needs-testing needs-dev- | Focuses:
note has-unit-tests | performance
-------------------------------------------------+-------------------------
Changes (by peterwilsoncc):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"60925" 60925]:
{{{
#!CommitTicketReference repository="" revision="60925"
Cron API: Spawn cron jobs on shutdown hook.
Modifies `wp_cron()` to register the spawning of cron jobs on the
`shutdown` hook rather than the `wp_loaded` hook.
The loopback request made while spawning cron jobs is intended to be non-
blocking, however in some circumstances that isn't the case and the
spawning will increase the time to first byte.
Props westonruter, pmbaldha, mukesh27.
Fixes #63858.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63858#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list