[resolved] [Plugin: WP-Crontrol] Making it work in WordPress 2.7 (1 post)

  1. Tanin
    Posted 6 years ago #

    If you run a job manually with "Do now" from the Tools->Crontrol screen in WP2.7, you'll most likely get a "missing argument 1 for spawn_cron()" error. In order to fix this, edit the "run_cron" function in wp-crontrol.php file.

    You need to add $local_time to the spawn_cron call.

    function run_cron($hookname, $sig) {
    // Add this:
    	$local_time = time();
        	$crons = _get_cron_array();
            foreach( $crons as $time=>$cron ) {
                if( isset( $cron[$hookname][$sig] ) ) {
                    $args = $cron[$hookname][$sig]['args'];
                    wp_schedule_single_event(time()-1, $hookname, $args);
    // Change this:
                    return true;
            return false;

    This will make this function call spawn_cron() correctly allow the plug-in to work again.

Topic Closed

This topic has been closed to new replies.

About this Topic