@webtent
Weird, in my sites, the phone home cron job is run every 14 days:
I have plenty of other jobs that cycle as expected, but not this one. Wonder if there is a way to reset or see results? Backup works fine.
@webtent
For now, try to deactivate BWP and then reactive again.
Is there is something different with the cron job?
@webtent
since we haven’t heard back from you, I’m going to mark it as resolved.
If you’re still having problems, feel free to let us know ;),
Btw, If you find BackWPUp is useful for you, we would really appreciate if you leave a positive review and rating.
This would encourage us to develop new free features and provide free support 😀
https://wordpress.org/support/plugin/backwpup/reviews/
webtent, recreate jobs. It will help.
UPD: Sorry, wrong. Re-creating the task did not help. Not correctly looked at the log.
Settings – Jobs – Maximum script execution time, change from 0 to 300. Reduce the frequency, but wp-cron.php? Doing_wp_cron = will still appear too often.
In the next folder there is another wordpress, also with this plugin. There are no such problems. I unfortunately deactivate the plugin.
-
This reply was modified 5 years, 4 months ago by elimS.
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' );
}