[wp-trac] [WordPress Trac] #57271: Cron unschedule / reschedule event errors

WordPress Trac noreply at wordpress.org
Fri May 3 08:15:11 UTC 2024


#57271: Cron unschedule / reschedule event errors
------------------------------------------+------------------------------
 Reporter:  domainsupport                 |       Owner:  audrasjb
     Type:  defect (bug)                  |      Status:  assigned
 Priority:  normal                        |   Milestone:  Awaiting Review
Component:  Cron API                      |     Version:  6.0
 Severity:  normal                        |  Resolution:
 Keywords:  needs-unit-tests needs-patch  |     Focuses:
------------------------------------------+------------------------------

Comment (by emilycestmoi):

 Replying to [comment:81 domainsupport]:
 >
 > If you aren't seeing duplicate WP cron ... I would be wondering why the
 serialised `cron` option data is the same when rescheduling or
 unscheduling? By definition the serialised data should either have an
 updated event or a removed event which would result in a different
 serialised string in either case?

 Yes, that is a good question. The short answer is I haven't had the time
 to trace through the scenarios where this is happening. The long answer is
 update the 'cron' option isn't exactly an atomic operation in WordPress.
 Every time something is scheduled/unscheduled the 'cron' option is
 updated. I'm guessing there are multiple updates happening to the 'cron'
 option as cron is running, perhaps a cron event is rescheduling itself
 during the event run? I'm not sure, but I can think of scenarios where
 this is plausible.

 I'm crazy busy atm but if I can find some time over the next week or two
 I'll try to setup some logging to trace the sequence of events that leads
 to the duplicate cron data update.

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


More information about the wp-trac mailing list