Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Many repeated errors in error_log
(1 viewing) (1) Guest
"ARI Stream Quiz" WordPress plugin
Go to bottomPage: 1
TOPIC: Many repeated errors in error_log
#69785
Many repeated errors in error_log 1 Year, 3 Months 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
The administrator has disabled public write access.
 
#69786
Re:Many repeated errors in error_log 1 Year, 3 Months 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 ?
The administrator has disabled public write access.
 
#69788
Re:Many repeated errors in error_log 1 Year, 3 Months ago Karma: 746
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
The administrator has disabled public write access.
 
#69928
Re:Many repeated errors in error_log 1 Year, 2 Months ago Karma: 0
perfect, thank you for your answer
The administrator has disabled public write access.
 
Go to topPage: 1