Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#33681 closed defect (bug) (duplicate)

taxonomy.php in _wp_check_for_scheduled_split_terms calls wp_schedule_single_event in wrong parameters order

Reported by: aalmenar's profile aalmenar Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.3
Component: General Keywords:
Focuses: performance Cc:


I had a problem on a wordpress installation that cron was getting filled (10MB in one record) with a lot of single execution of crons.

After discovering that single execution crons get added using wp_schedule_single_event( $timestamp, $hook, $args = array()), i found that taxonomy.php on version 4.3 has a change that keeps adding the same cron without empty arguments and with a hook of the current timestamp.

I made a change on this file (taxonomy.php) and now my cron on options table doesnt get filled.

function _wp_check_for_scheduled_split_terms() {

if ( ! get_option( 'finished_splitting_shared_terms' ) && ! wp_next_scheduled( 'wp_batch_split_terms' ) ) {
(Removed) wp_schedule_single_event( 'wp_batch_split_terms', time() + MINUTE_IN_SECONDS );
(Added) wp_schedule_single_event( time() + MINUTE_IN_SECONDS, 'wp_batch_split_terms' );


wp_schedule_single_event had parameters in the wrong order making the cron addition without any valid hooks but the timestamp.

Now performance problems and issues with database are gone.

Change History (1)

#1 @DrewAPicture
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #33423.

Note: See TracTickets for help on using tickets.