Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #57271, comment 82


Ignore:
Timestamp:
05/03/2024 08:15:45 AM (13 months ago)
Author:
emilycestmoi
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #57271, comment 82

    initial v1  
    33> 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?
    44
    5 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.
     5Yes, 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 updating 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.
    66
    77I'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.