What To Do When You Keep Getting Scheduled Event Errors
What You Might Be Seeing
A scheduled event (ssa_cron_process_async_actions) has failed to run. Your site still works, but this may indicate that notifications and synchronization with 3rd party services may not work as intended.”
- “A scheduled event (delete_expired_transients) has failed to run”
Why You’re Getting Scheduled Event and Cron Errors
WordPress websites by default run and execute code when someone visits a page on your site. This is setup to avoid wasteful processing power.
When a visitor goes to your home page, WordPress displays the page and also checks for any background tasks that it should be doing (Ex. Sending your Email Notifications). The system that does the checking is called WP-Cron.
If you’re meant to send a customer an email notification at 8AM and no one visits your site until 10AM, that means the email notification doesn’t send until 10AM. If the appointment is at 9AM, then the notification email won’t send out, and they’ll never get that email.
Sometimes you’ll receive scheduled event errors, when this happens it just means some of the jobs your website needed to run did not execute on time.
How to Stop Scheduled Event and Cron Errors
Tracking Emails Sent From Your Site
The first step is to download a free plugin to keep track of the emails being sent. We recommend using WP Mail Logging by MailPoet: https://wordpress.org/plugins/wp-mail-logging/
Once you’ve installed and activated your plugin, the plugin will immediately start logging your sent emails.
To find the log, you’re going to go under Tools > WP Mail Log.
Before you move on to the next steps, make sure to go back to your calendar and book a test appointment. You could set the email to send to yourself. When you’re done you can go back to the WP Mail Log tool and see if they’ve appeared on the log.
Make sure that all the emails you’re expecting to send out, show up on the log.
Uptime Robot for triggering WP-Cron
There’s a free service called Uptime Robot, that’ll check your website every 5 minutes and trigger WP-Cron. This will make sure your email notifications send out on time.
Set up a free account with Uptime Robot, here: https://uptimerobot.com
After signing up and logging in, you need to Add New Monitor.
Set the Monitor Type as HTTP(s). Give the Monitor a Friendly Name, such as the name of your site + Cron. And for the URL use the homepage of your site along with wp-cron.php?doing_wp_cron added to the end.
Example URL for Uptime Robot: https://mywebsite.com/wp-cron.php?doing_wp_cron
You should see the new monitor setup on the left panel, if you click on it it’ll give you more information – like when you started the monitor or if there’s any errors with it.
Once setup, go back to your calendar and book a test appointment to send an email notification to yourself. After booking, go to WP Mail Log and check to see if you see all your expected emails there.
If they’re not sent immediately, wait about 5 minutes to allow Uptime Robot to trigger WP-Cron.