WordPress.org

Ready to get started?Download WordPress

Forums

wp-cron not working automatically - how to debug? (6 posts)

  1. djeyewater
    Member
    Posted 1 year ago #

    On my site scheduled posts are being missed and newsletters aren't being sent out on time. If I visit wp-cron.php?doing_cron manually, then the scheduled posts will be posted okay.

    In my server logs I see entries like
    "POST /wp-cron.php?doing_wp_cron=1358425422.1426320075988769531250 HTTP/1.0" 200 - "-" "WordPress/3.5; http://www.domain.com"
    so it appears that cron is being called automatically.

    I have tried following the steps suggested here: http://wordpress.stackexchange.com/questions/13625/how-to-debug-wordpress-cron-wp-schedule-event

    I have cleared up most of the errors that were appearing in the debug.log, apart from one related to get_theme_data being deprecated. But still cron is not working automatically.

    I have searched my project for the string 'DISABLE_WP_CRON' (in case it was defined in a plugin or something strange), but it is only mentioned in cron.php where it is checked to see if it is defined.

    The cron view plugin just lists the cron tasks and doesn't show why cron won't work automatically.

    So cron works manually, but not automatically, and I can't find out why it does not work automatically. Does anyone have any advice on how I can debug why it is not working automatically?

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    How much traffic does the site get? You do realise that wp-cron isn't a true cron but a pseudo version triggered by site visits, yes?

  3. djeyewater
    Member
    Posted 1 year ago #

    It's not super busy, but gets enough traffic (around 350 visits a day) that I don't want to go down the route of disabling all plugins and switching to the 2010 theme to see if the problem still persists.

    I guess I could copy the site and db to my local environment for testing, but would prefer to try easier debugging methods first (if there are any).

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    don't want to go down the route of disabling all plugins and switching to the 2010 theme to see if the problem still persists.

    This process of elimination is deliberately designed to locate the root cause as quickly as possible by first removing the most obvious and common culprits. There is no easier debugging method.

  5. djeyewater
    Member
    Posted 1 year ago #

    Thanks for the advice, I will give that a go then.

  6. djeyewater
    Member
    Posted 1 year ago #

    Thanks again for the advice, I managed to narrow it down to the W3 total cache plugin. I'm still not sure why cron is not working, but getting closer to the problem than I was before.

Topic Closed

This topic has been closed to new replies.

About this Topic