Support » Fixing WordPress » howto disable wp-cron

  • Hi, I have a problem with my blog (wich scores 30.000 unique users a day), since some days looks like that wp-cron is acting oddly. It uses a lot of CPU and i see it being hanged as process.

    Besides the problem wich causes that, i really would like to disable wp-cron to use my internal linux crontab (since i can do it and i like it more), i found an interesting howto here:

    which tells to insert in wp-config.php this command:

    define(‘DISABLE_WP_CRON’, true);

    I’ve done that (at the end of the file) but seems it’s not working since i keep seeing wp-cron spawning in my process list.

    I’m using wordpress 2.8.4 and I can’t upgrade since the blog is not mine (i just manage it) and the owner is not thinking about it.

    Someone know a way to disable wp-cron in a safe way then?


Viewing 4 replies - 1 through 4 (of 4 total)
  • maorb


    I’d be also happy to know also about that, do you have some insights about this situation?


    Me too!

    Adding that define will work, but not at the *end* of the wp-config file. Add it to the beginning, with all the other defines.

    If you want to make the wp-cron run on a real cron schedule system, then make a copy of wp-cron.php with a new name, edit it, and change this code:

    if ( !empty($_POST) || defined('DOING_AJAX') || defined('DOING_CRON') )

    To this:

    if ( defined('DOING_AJAX') || defined('DOING_CRON') )

    Then you can call your new cron job from a normal cron interface on some form of timed basis.

    Note, doing this will likely *increase* the load on your server. WP-Cron is incredibly lightweight, much more so than a normal cron system. If you have problems with wp-cron, then you might try using the ALTERNATE_WP_CRON define (just define it to true in wp-config).

    Moderator t-p


    I am a layperson, and after reading this thread I am totally confused.

    As I undersatnd (my understanding may be wrong) Why the cron has to be running all the time? What’s the purpose? Why need to have it be running itself? I just don’t get all this.

    Otto, can you please shed somelight for a non-proggramer like me.


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘howto disable wp-cron’ is closed to new replies.