[wp-trac] [WordPress Trac] #57271: Cron unschedule / reschedule event errors
WordPress Trac
noreply at wordpress.org
Fri May 3 00:17:21 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 galbaras):
Maybe I'm missing something, but could this output not be described as "2
crons ran successfully, then 1 triggered an error, then 1 ran succefully,
and another 1 triggering an error, then 3 ran successfully"?
The error MAY imply concurrent crons, but are we **sure** that's what's
causing it?
@emilycestmoi Could you perhaps use this code to catch those duplicates in
the act:
{{{#!php
/*
* The cron lock (a unix timestamp set when the cron was spawned),
* must match $doing_wp_cron (the "key").
*/
if ( $doing_cron_transient !== $doing_wp_cron ) {
error_log( "doing_cron_transient: "$doing_cron_transient,
doing_wp_cron: $doing_wp_cron \n", 0 );
return;
} else {
error_log( "identical cron transients: $doing_cron_transient \n", 0 );
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57271#comment:78>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list