How To: Run WP-Cron manually, or more often naturally

If you are using WordPress as platform, or if you have almost no visitors, your cron tasks will not be ran often, unless you visit your WordPress yourself. But there are ways to trigger WP Cron either manually or regurarly and automatically.

What is WP-Cron?

Generally, cron means job scheduler. In WordPress, it’s called WP-Cron It contains a list of tasks (or jobs) which will be ran at specific times.

Manually trigger WP-Cron

This is extremely simple, you simply need to visit your website, or directly visit this URL, which will only call WP Cron:

https://yoursite.com/wp-cron.php?doing_wp_cron

From the command line of your terminal, you can also run this command:

wget -q -O - https://yoursite.com/wp-cron.php?doing_wp_cron

Automatically trigger WP-Cron regularly

You can call the URL I mentioned above with an online service dedicated to call URLs regularly. To do this, I recommend using EasyCron. It is both cheap (and there is a free version, which might be enough for you) and convenient.

If you are using my Social Engine plugin on a WordPress dedicated for this, for example, you will probably need to use EasyCron to trigger WP-Cron, so that Social Engine can be alive and well, and do its job of scheduling SNS posts. Here is how I use it:

That’s all it needs 🙂

What is this “?doing_wp_cron” added to the URLs

This is added to the URLs to make sure WP Cron is actually ran, and check if there are any pending tasks.

By default, WP Cron is actually ran for every request to WordPress. However, this check can be disabled. This is why ?doing_wp_cron is sometimes added by plugins or WordPress itself as well.

If you are interested, you can disable WP Cron by adding this line to your wp-config:

define('DISABLE_WP_CRON', true) ;

Then you can use the technique I talked about in the previous section to automatically trigger WP Cron through EasyCron, without impacting your visitors.