I have also encountered this problem, and I’ve found a workaround for it.
The problem is that the plugin’s ‘cron_schedules’ hook is initialized in the Inpsyde_PhoneHome_CronController::schedule() function. But this code is not reached when the wp-cron.php file executes the cron job.
Due to this, the wp_reschedule_event() function will try to reschedule it, but because the ‘twice_weekly’ schedule isn’t initialized, it will fall back to rescheduling the event to be executed initially.
On my solution, this gave a 2-300 ms overhead on every single request.
The fix would be to ensure the ‘cron_schedules’ hook is also called for cron requests.
My workaround was to add the following lines to my functions.php file:
//
// WORKAROUND: The BackWpUp plugin doesn't reschedule events correctly
// This hook fixes a problem where each request would call the WP cron and perform a remote request
// The problem happened because the plugin doesn't initialize its cron schedule on the wp-cron.php page
//
if ( class_exists('Inpsyde_PhoneHome_CronController') ) {
function fix_backwpup_cron_schedule( $schedules ) {
is_array( $schedules ) or $schedules = array();
$label = __( 'Every %d days', 'inpsyde-phone-home' );
$interval = apply_filters( 'inpsyde-phone-home-cron-interval', Inpsyde_PhoneHome_CronController::RECURRENCE_INTERVAL );
is_int( $interval ) or $interval = Inpsyde_PhoneHome_CronController::RECURRENCE_INTERVAL;
$schedules[ Inpsyde_PhoneHome_CronController::RECURRENCE_KEY ] = array(
'interval' => $interval,
'display' => sprintf( $label, ceil( $interval / DAY_IN_SECONDS ) )
);
return $schedules;
}
add_filter( 'cron_schedules', 'fix_backwpup_cron_schedule' );
}