• Oliver Campion

    (@domainsupport)


    Is anyone else seeing errors like this in v6.1 (I think since v6.0.2 and v6.0.3) … ?

    [09-Nov-2022 11:28:28 UTC] Cron unschedule event error for hook: do_pings, Error code: could_not_set, Error message: The cron event list could not be saved., Data: {“schedule”:false,”args”:[]}
    [09-Nov-2022 18:05:03 UTC] Cron unschedule event error for hook: wordfence_processAttackData, Error code: could_not_set, Error message: The cron event list could not be saved., Data: {“schedule”:false,”args”:[]}

    Thank you,

    Oliver

Viewing 5 replies - 46 through 50 (of 50 total)
  • @domainsupport Post #13 on my trac ticket. It’s doesn’t have to be the same millisecond. I have a proven double fire.

    Keeping in mind, my cron fires every minute, so I get 1,440 chances a day for this to happen. I saw about 1-3 double fires daily.

    Thread Starter Oliver Campion

    (@domainsupport)

    However … transients are stored in the database … you see where I’m going here? ??

    @j3gaming It doesn’t matter. The timing is irrelevant if you have an issue with your database. In this scenario the doing_cron transient cannot be saved or retrieved. If the transient cannot be saved and it cannot be retrieved then concurrent CRON would be able to occur.

    So I’m afraid that once again this points to the database being the cause of both issues (concurrent CRON events and the could_not_set notice).

    I got that same Cron unschedule event error for hook etc. issue plaguing the logs many times a day for many months. A week or so ago seems it got finally fixed for me by changing crontab from cURL to CLI.

    This:

    */5 * * * * cd /var/www/example.com/public; php -q wp-cron.php >/dev/null 2>&1

    instead of this:

    */5 * * * * curl https://example.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

    Not sure why that change was effective in my case. For the record, the site uses WP Fastest Cache, and is behind CloudFlare.

    @domainsupport

    I am on a shared server, so no access to my database details. I asked my ISP, and per them, the databases are monitored and no problem to report. I will not be able to get more info from the database activity.

    I have moved since one day to a Linux cron instead of the WP cron for 3 websites. Let’s see if I get errors again.

    Thanks for the support.

    Didier.

    Thread Starter Oliver Campion

    (@domainsupport)

    @swissspaceboy If you’ve been able to move to Linux fired CRON rather than WP CRON, I would recommend making sure that the /wp-cron.php has access denied to all but your Linux server external IP. You can do this with .htaccess in Apache or in the main configuration with Nginx. That will make sure that WP CRON cannot be fired by third party requests to absolutely make sure CRON is not fired other than when you want it to be.

    Also make sure that you have disabled WP CRON in /wp-config.php with …

    define('DISABLE_WP_CRON', true);

    If you have a shared server for your database, you will almost certainly have a limit to the number of concurrent connections and RAM. It may be worth asking them what that is. At least then you might have an idea if this provider’s servers are sufficient for your site.

    Oliver

Viewing 5 replies - 46 through 50 (of 50 total)
  • The topic ‘Cron unschedule event error for hook’ is closed to new replies.