Replacing WP-Cron with a more reliable system cron job

WordPress uses its internal cron system to run scheduled tasks. It’s possible for advanced users to replace that with the server’s more reliable crontab system if needed for some reason.

If you need to do this, first edit the site’s wp-config.php file to disable the standard WordPress cron tasks, adding this line:

define('DISABLE_WP_CRON', true);

Then add a cron job for your site that looks like this:

*/5 * * * * cd ~/html && /usr/local/bin/wp cron event run --due-now >/dev/null 2>&1

That will automatically run the WordPress cron tasks in a reliable manner.