By default, WordPress runs background tasks on occasion when pages are visited. This can lead to scheduled posts appearing late. If you’d like to set up a real cron job for WordPress, do the following:

crontab -e

Add the line:

*/15 * * * * wget -q -O - >/dev/null 2>&1

Also, edit wp-config.php, and add the line:

define('DISABLE_WP_CRON', true);

This will run WordPress’ background tasks every fifteen minutes regardless of when site visits occur. And, it turns off the process that runs on occasional site visits – which is unnecessary if you have a cron job.

About The Author