[wp-trac] [WordPress Trac] #57271: Cron unschedule / reschedule event errors
WordPress Trac
noreply at wordpress.org
Thu May 2 14:48:26 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 emilycestmoi):
I cannot reproduce "WP cron firing twice in the same microsecond". Can we
get some instructions on how to log this behaviour?
For example, I just modified my wp-cron.php and inserted a line to log the
transient:
{{{
// XXX-EN
error_log('got transient: ' . $doing_cron_transient . "\n", 0);
/*
* 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 ) {
return;
}
}}}
After running this overnight on one of my sites this is my cron log
output:
{{{
got transient: 1714659602.8254570960998535156250
got transient: 1714659722.2510559558868408203125
got transient: 1714659842.5517539978027343750000
Cron reschedule event error for hook: newsletter_bounce_run, Error code:
could_not_set, Error message: The cron event list could not be saved.,
Data: {"schedule":"newsletter","args":[],"interval":300}
got transient: 1714659962.9193520545959472656250
got transient: 1714660082.4408359527587890625000
Cron reschedule event error for hook:
cartflows_ca_update_order_status_action, Error code: could_not_set, Error
message: The cron event list could not be saved., Data:
{"schedule":"every_fifteen_minutes","args":[],"interval":1200}
got transient: 1714660203.2717330455780029296875
got transient: 1714660322.7761120796203613281250
got transient: 1714660442.4618968963623046875000
}}}
What am I missing?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57271#comment:76>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list