Many repeated errors in error_log 2 Years ago
|
Karma: 0
|
When I check my error_log file, I see many repeated errors.
Here is an example of an error line that keeps coming up:
[10-Dec-2022 12:12:58 UTC] Task rescheduling event error for check_plugin_updates-ari-stream-quiz hook. Error code: invalid_schedule. Error message: The scheduled event does not exist. Data : {"schedule": "every2hours", "args":[], "interval":7200}
Original error in French :
[10-Dec-2022 12:12:58 UTC] Erreur d’événement de replanification de tâche pour le crochet check_plugin_updates-ari-stream-quiz. Code d’erreur : invalid_schedule. Message d’erreur : L’évènement planifié n’existe pas.. Données : {"schedule":"every2hours","args":[],"interval":7200}
Regards,
Paul
|
|
|
|
|
Re:Many repeated errors in error_log 2 Years ago
|
Karma: 0
|
I found in file plugin-update-checker.php the following code
Code: |
public function __construct($updateChecker, $checkPeriod) {
$this->updateChecker = $updateChecker;
$this->checkPeriod = $checkPeriod;
//Set up the periodic update checks
$this->cronHook = 'check_plugin_updates-' . $this->updateChecker->slug;
if ( $this->checkPeriod > 0 ){
//Trigger the check via Cron.
//Try to use one of the default schedules if possible as it's less likely to conflict
//with other plugins and their custom schedules.
$defaultSchedules = array(
1 => 'hourly',
12 => 'twicedaily',
24 => 'daily',
);
if ( array_key_exists($this->checkPeriod, $defaultSchedules) ) {
$scheduleName = $defaultSchedules[$this->checkPeriod];
} else {
//Use a custom cron schedule.
$scheduleName = 'every' . $this->checkPeriod . 'hours';
add_filter('cron_schedules', array($this, '_addCustomSchedule'));
}
if ( !wp_next_scheduled($this->cronHook) && !defined('WP_INSTALLING') ) {
wp_schedule_event(time(), $scheduleName, $this->cronHook);
}
add_action($this->cronHook, array($this, 'maybeCheckForUpdates'));
register_deactivation_hook($this->updateChecker->pluginFile, array($this, '_removeUpdaterCron'));
//In case Cron is disabled or unreliable, we also manually trigger
//the periodic checks while the user is browsing the Dashboard.
add_action( 'admin_init', array($this, 'maybeCheckForUpdates') );
//Like WordPress itself, we check more often on certain pages.
/** @see wp_update_plugins */
add_action('load-update-core.php', array($this, 'maybeCheckForUpdates'));
add_action('load-plugins.php', array($this, 'maybeCheckForUpdates'));
add_action('load-update.php', array($this, 'maybeCheckForUpdates'));
//This hook fires after a bulk update is complete.
add_action('upgrader_process_complete', array($this, 'maybeCheckForUpdates'), 11, 0);
} else {
//Periodic checks are disabled.
wp_clear_scheduled_hook($this->cronHook);
}
}
|
Maybe I can deactivate the error by modifying this code ?
|
|
|
|
|
Re:Many repeated errors in error_log 2 Years ago
|
Karma: 760
|
Hello,
If you want to disable cron job then replace the following code:
Code: |
if ( $this->checkPeriod > 0 ){
|
with the following one:
Code: |
if (false && $this->checkPeriod > 0 ){
|
Regards,
ARI Soft
|
|
|
|
|
Re:Many repeated errors in error_log 1 Year, 11 Months ago
|
Karma: 0
|
perfect, thank you for your answer
|
|
|
|
|
|