• Resolved AnnasGourmetGoodies

    (@annasgourmetgoodies)


    I have disabled wp-cron in my config file and setup a manual cron job. However, I’m noticing that it is still being triggered when a visitor hits the site. Is there something in WP Optimize that might be causing this to run wp-cron even when it is disabled? If so, is there a code snippet I can add to force it not to run?

    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support vupdraft

    (@vupdraft)

    Hi

    Your scheduled events/cron events should still run if you are using a manual cron job, your site just does not rely on visitor numbers to keep everything running,

    Thread Starter AnnasGourmetGoodies

    (@annasgourmetgoodies)

    Thanks – but that is not my question. I have wp-cron set to be ‘DISABLED’ in my config file. I do not want it to run when someone visits the site. I only want it to run when the cron job on the server runs. It was suggested that caching plugins my by-pass the settings in the config file. Is it possible that WP Optimize is doing this?

    Plugin Support vupdraft

    (@vupdraft)

    Where was this suggested? I have never come across an instance where a caching plugin had this kind of control

    Thread Starter AnnasGourmetGoodies

    (@annasgourmetgoodies)

    ChatGPT – trying to help me debug the issue. Just suggesting things to check.

    Thread Starter AnnasGourmetGoodies

    (@annasgourmetgoodies)

    I found this comment in your code – maybe this helps?

    // Don’t cache disallowed extensions. Prevents wp-cron.php, xmlrpc.php, etc.
    * For plugins replacing wp-cron, return the number of events successfully

    Plugin Support vupdraft

    (@vupdraft)

    This stops the wp-cron.php and xmlrpc.php and other things that shouldn’t be cached from being cached. It would not allow the caching plugin to override the statement to disable the cron.

    There is nothing within the plugin that would be capable of doing that

    Thread Starter AnnasGourmetGoodies

    (@annasgourmetgoodies)

    Thanks – your plugin is not the culprit.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘wp-cron running even when disabled’ is closed to new replies.