Overview
A cron job is a script or function that is run on a regular basis at a predetermined time. It might be one-time chores like writing a blog post or ongoing actions like checking for updates. WordPress only checks for scheduled items with each page load to assist in improving performance, which is fantastic for low to medium-traffic sites, but on more busy sites, this constant scanning operation can actually slow things down quite a bit.
Understanding How WP-CRON Works
WP-CRON is not the same as a traditional cron job. Instead, each time a site page is loaded, it checks for planned events. This works nicely with a regular stream of moderate traffic, but the two extremes cause problems.
High traffic – If the site has too much traffic, it will check its WP-CRON schedule on a regular basis, increasing the server’s workload and negatively harming performance.
Low traffic – On the other hand, if there is little to no traffic, the site’s scheduled items are not checked as frequently as they should be, and planned jobs, such as backups from plugins or scheduled posts, may be missed.
Create a Cron Job in your GreggHost Panel
Creating a basic cron job to run all of your site’s scheduled events.
Stopping WP-CRON from checking for the same planned events over and over again.
In your GreggHost Panel, create a Cron Job.
This is already configured for you if your site is hosted on a GreggPress package. Every 15 minutes, your server is programmed to check for scheduled events.
Go to the Cron Jobs section of the website.
Create a new cron job and put the following command in the command to run field:
https://example.com/wp-cron.php?doing wp cron wget -q -O
Your domain name should be replaced by https://example.com.
Prevent WordPress from checking for scheduled events on every page load
To disable the WP-CRON service, follow the steps below. Use WebFTP to connect to your server. Edit the wp-config.php file by right-clicking it.
Stop editing just before the /* That’s all! Insert the following code on the */ line:
define(‘DISABLE WP CRON’, true) ; define(‘DISABLE WP CRON’, true) ; define(‘DISABLE W
This stops WP-CRON from running when the page loads, but not when it’s called directly.