• Resolved Tanin

    (@0xtc)


    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:
                    spawn_cron($local_time);
    //
                    return true;
                }
            }
            return false;
    }

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

  • The topic ‘[Plugin: WP-Crontrol] Making it work in WordPress 2.7’ is closed to new replies.