• Resolved nicgios

    (@nicgios)


    Hi all,
    sorry for the stupid question, but I don’t know how to solve it.

    I have a wp blog using a heavy-modified-by-myself theme which works fine. I added two small functions to functions.php (in the theme) in order to erase some posts at a given time and scheduled them with wp_schedule_event.

    When I worked locally (with a copy of my theme) all is fine but on my website server crontrol gives me this message:

    There was a problem spawning a call to the WP-Cron system on your site. This means WP-Cron jobs on your site may not work. The problem was:
    name lookup timed out

    Well, ok… I thougth it was not an important issue so I

    1. put
      define('DISABLE_WP_CRON', true);
      in my config
    2. copy wp-cron.php to my_own_wp_cron.php
    3. changed these lines:
      if ( !empty($_POST) || defined('DOING_AJAX') || defined('DOING_CRON') )
            die();

      to these:

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

      in my_own_wp_cron.php

    4. create a crontab entry that calls my_own_wp_cron.php

    But crontrol shows me the same old functions and (worst thing!) my functions don’t work anymore (when I run them from crontrol… I guess because wp-cron is disabled). And, of course, my_own_wp_cron.php is not called (at least it doesn’t seem so… btw, how can I check this?)

    If I set
    define('ALTERNATE_WP_CRON',true);
    in my config, the error message disappear, but no result anyway…

    Thanks in advance for your help.

    ps. Is there a way to “clear” wp-cron?

Viewing 1 replies (of 1 total)
  • Thread Starter nicgios

    (@nicgios)

    Well some changes:

    1. my functions works when I run them manually (at least)…
    2. the message in crontrol is now:

      There was a problem spawning a call to the WP-Cron system on your site. This means WP-Cron jobs on your site may not work. The problem was:
      connect() timed out!

    3. if i change the start time for a job, and it passes, the job sticks to “now” without any effect… ??

    Many thanks for help

Viewing 1 replies (of 1 total)
  • The topic ‘wp_cron name lookup timed out’ is closed to new replies.