How To Make The WordPress Cron Work

WordPress, internally, enable plugins to register for a periodic call used to send newsletter, clean caches, retrieve external content and so on. WordPress it self relies on that system, for example to publish future posts.

This “cron” system, under some circumstances it can fully stop or be very imprecise. Reasons are low traffic sites, caches, configurations and so on.

The first check you must do to be sure the WordPress cron can work, if to open your wp-config.php file and assure there is no a line like

define('DISABLE_WP_CRON', true);

if present, remove it.

The second step is to setup an external HTTP call to trigger priodically the cron system of WordPress. It is easy to do (and your tech support can help you, so ask them!).

On Hostgator

If you are hosted on Hostgator, on their control panel (called cpanel – its address was sent on account activation email) you can setup a cron job. A cron job is something will be execute periodically. What we need is an HTTP call to the file wp-cron.php of your WordPress installation. It can be make with:

wget --delete-after http://www.yourdomain.com/wp-cron.php

if the blog is installed in a sub folder, the call must be changed to something like:

wget --delete-after http://www.yourdomain.com/subfolder/wp-cron.php

You can try that address (http://www.yourdomain.com/wp-cron.php) to see if a blank page is returned (it’s ok) or if there is some error report (the address is not correct).

To make Newsletter work smoothly, this call should be done every 5 minutes. To setup that, see the Hostgator cpanel screen shot below (copy the values exactly as in the picture):

Using a free cron service

If you provider cannot be of help in setting up a cron job, you can try to use a free service (usually they have even a counter professional part).

www.setcronjob.com

It’s ultra easy to setup, and the clear “URL to call” configuration must be set to http://www.yourdomain.com/wp-cron.php.

Other can be (I have not signed up with them to see the control panel):

  • www.onlinecronjobs.com
  • cronless.com
  • www.cronjobs.org
  • www.easycron.com
  • www.mywebcron.com

 


My excuses for my bad english but it's the only way I have to communicate with you. Would you suggest a correction? Leave a comment, thank you!

29 thoughts on “How To Make The WordPress Cron Work

  1. DnlCY

    Hi Stefano,

    I can’t active the delivery engine…it’s status in Not Active.
    But WordPress Cron System is ENABLED

    I set a free cron at http://www.setcronjob.com, and this seems to work correctly.

    I have installed 3.3.6 version and my website is:
    http://www.magazineim.com/home

    The emails are only sent when I manually trigger the delivery engine, and only goes 37emails per trigger.

    I also have this message:
    “The delivery engine is off (it should never be off). See the System Check below to reactivate it.”

    I also checked that I have PHP Execution Time 60 (seconds), should be higher?

    What do I need more?

  2. netar

    Tried cron job from cp doesn’t work, tried external cron doesn’t work…
    Wp-cron is fine otherwise.

    However it does work if I manually trigger delivery engine in admin panel.

    Any idea?

    1. Shubhank

      Same as your, wp-cron working, tried external cron still doesnt works, manually using trigger delivery engine works. I am using W3 Total Cache plugin but yeah even external cron call doesnt works

      1. Stefano Post author

        Hi, I configured a number of external and internal cron calls with success, you should contact at least the provider and ask to setup a wget call to your wp-cron.php file every 5 minutes.

        See what the support responds.

  3. cala

    Grazie mille per tutte queste spegazioni e anche per l’inglese abbastaza giusto che si capisce anche tradotto in francese da robots !
    Sinceramente : grazie !

  4. J.T Dabbagian

    I am currently attempting to create a newsletter for a client, and I when I attempt to subscribe, I get no email whatsoever. I don’t show up in the lists, nor do I get a confirmation of any kind. However, test emails do work.

    I have access to the Cron via cPanel, and I have entered the code you suggested into it. It has not helped.

    Website: http://www.iamalifeartist.org
    Host: Bluehost
    WordPress: Current Version

    1. Stefano Post author

      This is a post that explains something about WordPress cron system and not a support area. Why did you not used the support form or mailed me directly?

      Refund is on the way.

  5. nagol81@gmail.com

    Qualcuno è riuscito poi a farlo funzionare? Io le sto provando di tutte ma non ci riesco, o meglio ci sono riuscito ma sempre a mezzanotte, probabilmente c’è un errore nel codice per quanto riguarda la scelta dell’ora…

  6. Tassio

    Sorry about sending my url many times, it is not showing up, probably because you need to approve them, just realized it now :) Thanks for having a look at it.

    Do you think that if it used to work before, and now it doesn’t work it might be because there was some change in my hosting company set up?

    Thanks again!

  7. Tassio

    The weird thing is that it used to work, the last time I sent a newsletter it was november last year, it all used to work fine.

    Then I have just tried this week to send another one and I got this error.

  8. Tassio

    I’m having the same problem here.

    The screen locks in (email status: sending).

    The weird thing is that while this is happening, if I click anywhere on the dashboard, let’s say The “Emails” Option on the newsletter menu, the email gets sent straight away.

    I’ve tested many times, I have waited for over 30 minutes and nothing happens, but as soon as I click any link: emails, subscribers… then the email is sent.

  9. neil

    Same here
    Ive signed up to a free cron service
    Im using bluehost to host the site but i get no emails.
    Test emails are fine.
    checking the emails tab, this is the negative figure
    Delivery engine next run: -1327165945 seconds
    Looks like it could be a while.
    2 options, instal the previous version or find another plugin :-(

    any ideas?

    1. Stefano Post author

      I called your wp-cron and it seems to work. Did you setup correctly the free cron? Did you checked the wp-config to see if cron is disabled?
      The newsletter cron is visible using the wp-control plugin?

  10. John Cooper

    Hi,

    I’ve upgraded my WordPress site to the new version of newsletter and now it no longer works. I have followed the FAQ and set up a free Cron at http://www.setcronjob.com, but still the newsletter doesn’t work. It was working fine on the previous version. Is there a way to roll back to the previous version of your newsletter without the cron ?

Leave a Reply