[wp-trac] [WordPress Trac] #11800: doubled execution of cron jobs
WordPress Trac
wp-trac at lists.automattic.com
Wed Jun 1 21:14:01 UTC 2011
#11800: doubled execution of cron jobs
--------------------------+-----------------------------
Reporter: neoxx | Owner: westi
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Cron | Version: 2.9.1
Severity: normal | Resolution:
Keywords: cron |
--------------------------+-----------------------------
Changes (by mintindeed):
* cc: gabriel.koen@… (added)
Comment:
The patch I created for #15148 creates a cron table with one row per job.
The primary key field is a token using a hash of the timestamp, hook, and
arguments. The schedule cron function will blindly try and insert any job
you tell it, but since the primary key is a hash of those params,
duplicate entries will simply fail to be inserted into the database
(without a separate query to check if they already exist).
There's also a status field, so theoretically wp-cron.php could be
modified to spawn off multiple processes (1 for each job) which would then
update the status of the job they're working on (pending, processing,
completed). Basically laying the groundwork for a real job queue, if
that's the direction you want to take it.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11800#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list