WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WP 2.1 Cron not working (6 posts)

  1. AlexeyG
    Member
    Posted 7 years ago #

    Hello,
    I've modified a plugin that uses WP 2.1 builtin pseudo cron features. But never could see the timers work. So I started to debug and found that timers do work, but the cron (/wp-cron.php) never gets executed. I found this out by manually running it. Then when I modified wp-cron.php to output debug info to a file and now I'm sure that it's never executed from spawn_cron() function (tho spawn_cron says it did open a socket OK). I'm not using SSL or anything that could prevent the opening of socket. What can be the problem?

  2. AlexeyG
    Member
    Posted 7 years ago #

    oh another thing to add, I also took a look at shedules in the cron list and before I executed it manually there was lots of do_pings in the list. That should also shwo that cron is not working for me.

  3. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    Verify that wp-cron.php is in the right location on your site. That would be in the location specified by the "WordPress address (URL):" in Options->General.

    Beyond that, not sure. It works okay for me.

  4. AlexeyG
    Member
    Posted 7 years ago #

    It is. Something just came on my mind. I have a password (.htaccess) for accessing the site(blog), so guess that's the problem.
    And due to implentation of cron I belive it is impossible to run it with htaccess or with SSL and perhaps something else. Wonder what else I can do except removing the .htaccess. Also wonder if it's possible to implent crontab in some other way.

  5. AlexeyG
    Member
    Posted 7 years ago #

    Oki, I resolved it, allowing access from all to wp-cron.php file, but still, would be nice to have spawn_cron() rebuilt, so that it wouldn't open socket conenction to server, but it some other way (I dun really have other ideas, except from simply running cron in same thread, but that'll coz speed loss for sure)

  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    Exactly. The idea is to open a connection to it so as to have it actually run the wp-cron jobs in another thread, since you're making another hit to the server. This way, it can run at the same time as the rest of the page request, and not cause any slowdown anywhere.

Topic Closed

This topic has been closed to new replies.

About this Topic