[wp-trac] [WordPress Trac] #25557: wp_next_scheduled May Return Wrong Timestamp
WordPress Trac
noreply at wordpress.org
Thu Oct 10 17:47:46 UTC 2013
#25557: wp_next_scheduled May Return Wrong Timestamp
--------------------------+-----------------------------
Reporter: model13 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Cron | Version: 3.6.1
Severity: normal | Keywords:
--------------------------+-----------------------------
The wp_next_scheduled function is written with the assumption that the
combination of $hook and $args will provide a unique identifier within an
array of cron jobs.
In practice some plugins are scheduling multiple cron jobs with the same
hook and args (usually an empty array). The function returns the timestamp
of the first match, thus returning the wrong timestamp.
(Will attempt to attach an image of sample output comparing the actual
timestamp for three cron jobs to the time returned by wp_next_scheduled.)
This may be regarded as an error on the part of plugin developers.
However, as there didn't seem to be a previous report on this issue, it
seemed to be worth noting.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25557>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list