[wp-trac] [WordPress Trac] #51716: WP Cron - looses entries
WordPress Trac
noreply at wordpress.org
Fri Nov 6 08:48:01 UTC 2020
#51716: WP Cron - looses entries
-------------------------------+------------------------------
Reporter: Nate1 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Cron API | Version:
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses: performance
-------------------------------+------------------------------
Changes (by johnbillion):
* keywords: => reporter-feedback
* focuses: => performance
* component: General => Cron API
Comment:
Thanks for the report, @Nate1.
To address your last point first, yes this is how the WP-Cron event system
works. [https://developer.wordpress.org/plugins/cron/ Info about WP-Cron
here] and [https://developer.wordpress.org/plugins/cron/hooking-wp-cron-
into-the-system-task-scheduler/ info about how to use system cron here].
Scheduling multiple events in quick succession from a single process
shouldn't be an issue. If you are seeing this problem then it would be
great if you can provide some more information, a code example,
information about your caching configuration, etc.
Scheduling multiple events simultaneously from more than one process --
for example when two requests hit your server at the same time or via two
separate Ajax or REST API calls -- can indeed fail or overwrite one
another due to the inherent problem caused by all events being stored in a
single option that leads to a race condition with the read-then-write
operations that the event scheduling functions perform.
[https://github.com/johnbillion/wp-crontrol/wiki/Cron-events-that-have-
missed-their-schedule I maintain some info about this here].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51716#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list