WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the alternate cron version, but i need to prevent it from running on some calls, how can i do this?

In the cron.php file i've seen on line 225

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

but i've tried defining define('DOING_AJAX', true) and it never stops the cron. Maybe i'm defining the constant too late. When should i define it?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.