WordPress has a built in system to handle scheduled background tasks. Each of the plugins you have installed on your site may run scheduled tasks in the background.

The default system in WordPress is relying on your site’s traffic, the higher the traffic the bigger the chance your background scheduled tasks will run on time. The default system is unreliable and may slow down the page load of your website.

While setting up a cron task can be a bit challenging, you will gain a lot in terms of reliability and page load.

Disable WP Cron

The first thing you’re going to need to do is disable that default system relying on your site’s traffic to trigger scheduled tasks.

Just edit your wp-config.php at the root of your website, and before the line “/* That’s all, stop editing! Happy blogging. */

Write the following line:

define('DISABLE_WP_CRON', true);

That’s it! It’s disabled, no scheduled tasks will run anymore, which is ok since your system was not working in a reliable way to start with.

Setup a real CRON job

Depending on your host, setting up a cron job will be done in a way or another.

If it’s too technical for you you can also create a cron job toward the cron url of your website.

Setup a simple url CRON job

Your WordPress’ site has a page which is dedicated to processing scheduled tasks.

If your site is mysite.com, the cron url will be mysite.com/wp-cron.php it may be different if your WordPress site is setup in a subfolder for instance mysite.com/subfolder/wp-cron.php

Now be aware that this service will call your URL frequently, it can be up to once a minute.

It’s fine but certain hosting company may block those call with their in-house firewall, that’s the case of BlueHost for instance.

That’s it! Hopefully our scheduled tasks run smoothly now.

Ben takes care of all technical aspects of Wappointment. His ultimate goal, a 100% reliable solution that's just powerful enough to cover all of the possible needs for appointment scheduling.