[wp-trac] [WordPress Trac] #41098: Some cron scheduling events are ignored
WordPress Trac
noreply at wordpress.org
Mon Jun 19 19:16:15 UTC 2017
#41098: Some cron scheduling events are ignored
--------------------------+-----------------------------
Reporter: bor0 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Cron API | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
The problem appears when two different events are scheduled at the same
time.
It's a bit hard to reproduce, but if one plugin is continuously scheduling
events (e.g. recurrent schedule every 5 mins, but they execute for 5
mins), another plugin's scheduling events might be completely ignored.
I believe this is because there is no lock mechanism in the schedule
functions where we write to the `cron` option in the database.
What happens in the code is:
Continuous (plugin #1): wp-cron.php has `wp_unschedule_event` in a loop
(which may overwrite `cron` option in the database)
Random (plugin #2): Call `wp_schedule_event` to update `cron` option, but
plugin #1 may have overwritten it already.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41098>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list