Stop WordPress running scheduled tasks during page loads, and run them on a schedule from your server instead.
// In wp-config.php: stop WordPress triggering cron on page loads.
define( 'DISABLE_WP_CRON', true );
// Then add a server cron job that runs every 5 minutes, for example:
// */5 * * * * wget -q -O - "https://example.com/wp-cron.php?doing_wp_cron" >/dev/null 2>&1
// or, with WP-CLI:
// */5 * * * * cd /path/to/site && wp cron event run --due-now >/dev/null 2>&1
WordPress runs scheduled tasks such as publishing scheduled posts, sending emails and cleaning up by checking on page loads. On busy sites that adds work to visitors’ requests, and on quiet sites tasks run late because nobody visits. A real cron job fixes both.
DISABLE_WP_CRON stops WordPress spawning wp-cron.php during page loads. Scheduled events still exist; they just wait to be run.
A cron job on your server then calls wp-cron.php every few minutes, or runs wp cron event run --due-now with WP-CLI, so tasks run on time whether or not anyone visits. Most hosts have a “Cron jobs” or “Scheduled tasks” section in their control panel for this.
Install WP Crontrol or open Tools → Site Health → Info. Events shouldn’t show as overdue after the cron job has had time to run.