[wp-trac] [WordPress Trac] #63830: Event system breaks when an event is scheduled during processing of a queue of more than one events

WordPress Trac noreply at wordpress.org
Fri Aug 15 22:19:58 UTC 2025


#63830: Event system breaks when an event is scheduled during processing of a queue
of more than one events
--------------------------+------------------------------
 Reporter:  madhazelnut   |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Cron API      |     Version:  6.8.2
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by madhazelnut):

 The cause is in the `_get_cron_array` function, which retrieves the cron
 via a regular `get_option` call, which, in turn, retrieves a cached
 version of the cron. A cached version of the cron is not going to contain
 an event added *after* the caching occurred, which is exactly what's
 happening here.

 The solution would involve retrieving an uncached version of the `cron`
 option, when performing the unscheduling.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63830#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list