[wp-trac] [WordPress Trac] #15670: Don't allow multiple schedulings of the same job.
WordPress Trac
wp-trac at lists.automattic.com
Fri Dec 3 21:41:37 UTC 2010
#15670: Don't allow multiple schedulings of the same job.
--------------------------+-------------------------------------------------
Reporter: sexytyranno | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Cron | Version: 3.0.1
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
I may be mistaken here, since I'm not that familair with WP's cron system,
but from the MySQL query log (which managed to fill up the server due to
this and a bad plugin), it looks like WP is allowing cron jobs to be
scheduled with the same contents repeatedly.
I do believe that WP should, under all circumstances, check to see if a
job matching the newly scheduled job already exists. If it does, then
don't schedule it twice, as this could have catastrophic results.
WP Version: 3.0.1
Socialize This Version: 2.0.3
The bad code that caused this was in the socialize-this plugin:
{{{
if(wp_get_schedule('cron_update_expiry_date') == FALSE){
wp_schedule_event(time(), 'hourly', 'updateSocialized');
}
}}}
The below is the first KB or so from the 0.5MB UPDATE SQL command that
resulted from this.
UPDATE `wp_options` SET `option_value` =
'a:3423:{i:1291407189;a:1:{s:16:\"updateSocialized\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"hourly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:3600;}}}i:1291407190;a:1:{s:16:\"updateSocialized\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"hourly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:3600;}}}i:1291407191;a:1:{s:16:\"updateSocialized\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"hourly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:3600;}}}i:1291407192;a:1:{s:16:\"updateSocialized\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"hourly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:3600;}}}i:1291407193;a:1:{s:16:\"updateSocialized\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"hourly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:3600;}}}i:1291407194;a:1:{s:16:\"updateSocialized\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"hourly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:3600;}}}i:1291407196;a:1:{s:16:\"updateSocialized\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"hourly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:3600;}}}i:1291407197;a:1:{s:16:\"updateSocialized\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"hourly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:3600;}}}i:1291407199;a:1:{s:16:\"updateSocialized\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"hourly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:3600;}}}i:1291407200;a:1:{s:16:\"updateSocialized\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"hourly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:3600;}}}i:1291407201;a:1:{s:16:\"updateSocialized\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"hourly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:3600;}}}i:1291407202;a:1:{s:16:\"updateSocialized\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"hourly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:3600;}}}i:1291407203;a:1:{s:16:\"updateSocialized\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"hourly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:3600;}}}i:1291407204;a:1:{s:16:\"updateSocialized\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"hourly\";s:4:\"args\";a:0:{}s:8:\"interval\";i:3600;}}}i:1291407205;a:1:{s:16:\"updateSocialized\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:6:\"hourly\";s:4:\"args\";a:0:{}s:8:\"interval
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15670>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list