Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #51716, comment 8


Ignore:
Timestamp:
02/15/2025 09:57:23 PM (4 months ago)
Author:
kkmuffme
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #51716, comment 8

    initial v1  
    22If plugin A calls `wp_schedule_event` (or any function that loads the cron tasks via _get_cron_array()) on e.g. plugins_loaded, and plugin B calls `wp_schedule_event` later (e.g. shutdown), the option value retrieved initially is modified. If any other requests modified/scheduled crons in the meantime, all their scheduled crons are lost - or vice versa if cron is running at the same time but finishes before we call wp_schedule_event the 2nd time, it could mean that suddenly old crons that are already completed will be added back and run a 2nd time.
    33
     4EDIT: if the "cron" option has "autoload" true, then it will be loaded in the beginning of the request and be in alloptions cache too, which means that all requests will overwrite all others requests changes to cron that happened since the current request started