Troubleshooting Action Scheduler Issues

Are you experiencing issues on your site after updating WP Mail SMTP? WP Mail SMTP includes a library of code called Action Scheduler, which helps your site process large tasks. However, a small number of sites run into issues when Action Scheduler is first set up.

This guide walks you through troubleshooting steps that are known to resolve common Action Scheduler issues.


What Is Action Scheduler?

Action Scheduler is a versatile library that is used to manage and schedule cron jobs in WordPress. It works by strategically scheduling certain action hooks to repeat or execute at a specific time in the future. By delaying or repeating hooks, Action Scheduler improves your site’s overall ability to process large tasks.

Many other popular WordPress plugins like WooCommerce and All in One SEO also rely on Action Scheduler to help execute actions more efficiently.

Note: For more specific details and helpful resources, be sure to check out Action Scheduler’s website.

How WP Mail SMTP Uses Action Scheduler

WP Mail SMTP uses Action Scheduler to help run larger tasks in the background without slowing down your site. These tasks are often time and resource-consuming.

For example, WP Mail SMTP uses it to help with the heavy lifting of various email logging and reporting features.

Troubleshooting Common Action Scheduler Issues

Action Scheduler-related issues most commonly occur when setting this tool up for the first time. In most cases, this includes an error message saying, “There has been a critical error on your website.” Additionally, you might see something similar that mentions there’s a fatal error because the wp_actionscheduler_actions table doesn’t exist yet.

This error can be caused by a variety of factors in your site’s configuration. In the next section, we’ll go over the steps needed to help troubleshoot this issue.

Note: We release plugin updates regularly, and a past update may have addressed the issue you’re seeing. Before continuing, be sure to update WP Mail SMTP to the latest version.

1. Deactivating the WP Mail SMTP Plugin

To get started, you’ll need to deactivate WP Mail SMTP. Depending on your hosting provider’s options, you’ll be able to do this by accessing site files through either File Transfer Protocol (FTP) or cPanel.

Once you’ve opened your site files, navigate to /wp-content/plugins/. Within the plugins folder, you should see a folder named wp-mail-smtp-pro (or wp-mail-smtp if you’re using our free version).

You’ll need to rename this folder. To adjust the name in an FTP program like FileZilla, you can do this by right-clicking on the folder name and then selecting Rename.

Rename plugin folder

By changing the name, WordPress will automatically deactivate the plugin for you. For our example, we’ll simply add -zz to the end of the plugin name, changing it to wp-mail-smtp-pro-zz.

Change folder to WP Mail SMTP pro zz

We’ll return to these site files later, so we recommend keeping this program open as you move on to the next steps.

2. Installing the Action Scheduler Plugin

After manually deactivating WP Mail SMTP, go ahead and log into your WordPress site. The admin area should be working normally now.

The next step is to install the Action Scheduler plugin. This will help your site to resolve any setup issues so you can get things back on track.

You can install the plugin directly from the WordPress admin area of your site by going to Plugins » Add New and searching for “Action Scheduler.”

Alternatively, you can download the plugin from Action Scheduler’s page on WordPress.org.

The downloaded file should be named something like, action-scheduler.3.4.0.zip where the numbers match the version number.

Once you’ve downloaded this zipped file, you’ll need to install and activate it on your WordPress site.

3. Creating Action Scheduler Tables

After installing the Action Scheduler plugin, go to the WordPress admin sidebar and navigate to Tools » Scheduled Actions.

Note: When plugins such as WP Mail SMTP, WPForms, and WooCommerce are activated on your site, the option to select Scheduled Actions from the WordPress admin sidebar may be hidden to prevent duplication. Please see our frequently asked questions for more details.

From here, you should see two notices: “Action Scheduler migration in progress. The list of scheduled actions may be incomplete.” and “It appears one or more database tables were missing. Attempting to re-create the missing table(s).”

Action Scheduler notices

You’ll need to wait at least a few seconds so that Action Scheduler has time to run. Then, go ahead and refresh the page.

If the tables have been created successfully, then the notices mentioned above will no longer be visible after you refresh the page. This means that you’re ready to go on to the next step!

Scheduled Action Tables

Note: If these notices do not disappear, then there are most likely server or database configuration issues preventing your site from working properly. Please contact your site’s hosting provider. You’ll need to ask them to check the site’s database logs to see what’s causing this issue.

4. Reactivating WP Mail SMTP

You’re now ready to get WP Mail SMTP back up and running on your site.

To do this, you’ll need to return to your site files. Then, change the plugin folder back to its original name (either wp-mail-smtp-pro or wp-mail-smtp, depending on which plugin version you’re using).

WP Mail SMTP Pro folder in filezilla

Now that you’ve restored the original name, you can switch back over to your WordPress admin area. From there, go to Plugins » All Plugins and make sure that WP Mail SMTP is activated on your site.

WP Mail SMTP plugin installed

Once WP Mail SMTP is active, be sure to deactivate the Action Scheduler plugin. After deactivating Action Scheduler, you can go ahead and delete this plugin from your site.

Frequently Asked Questions

Below, we’ve answered some of the top questions about troubleshooting Action Scheduler issues in WP Mail SMTP.

If the error I’m receiving isn’t causing my entire site to go down, do I still need to go through the troubleshooting steps?

If you’re running into an Action Scheduler error, but still have access to your site’s backend, then most likely the Action Scheduler tables haven’t been created yet.

To resolve this issue, you can try automatically generating your Action Scheduler tables by navigating to WP Mail SMTP » Tools » Scheduled Actions.

Scheduled actions settings WP Mail SMTP

By navigating to this area, new Action Scheduler tables should automatically be created for you and the issue should be resolved. However, if this doesn’t do the trick, we recommend working through each of the troubleshooting steps outlined above.

There are a lot of Action Scheduler tasks, doesn’t this affect my site’s performance?

Action Scheduler checks every minute to see if there are any scheduled tasks (cron jobs) to run. However, it will only execute jobs if it finds them. Don’t worry, if no jobs are scheduled, Action Scheduler just uses a small number of resources.

Though we don’t recommend doing so, you can change when Action Scheduler runs its checks via the action_scheduler_run_schedule hook.

Changing it to a lower frequency leads to less frequent checks of the scheduled jobs, which can affect other site functions that use Action Scheduler. For example, asynchronous emails won’t send as promptly and can be delayed by the new schedule.

How long are completed scheduled tasks stored in Action Scheduler?

By default, Action Scheduler will automatically remove completed tasks after thirty days. However, this time period can be changed with the action_scheduler_retention_period filter.

Here is a code snippet that decreases the retention period to one week:

function custom_as_retention_period() {
	return WEEK_IN_SECONDS;
}
add_filter( 'action_scheduler_retention_period', 'custom_as_retention_period' );

Note: For extra guidance, please see WPBeginner’s tutorial on adding custom code.

Why can’t I see the Scheduled Actions option in the WordPress admin sidebar?

Some plugins that install the Action Scheduler library (such as the Action Scheduler plugin itself) add a Scheduled Actions option to the WordPress sidebar’s Tools menu. However, other plugins that include the Action Scheduler library, such as WP Mail SMTP, WPForms, and WooCommerce remove this option to avoid duplication.

Instead, once WP Mail SMTP is activated, this option is provided in WP Mail SMTP » Tools under the Scheduled Actions tab.

Scheduled actions tab WP Mail SMTP

If you’d like to, you can still access the Scheduled Actions page using the WordPress Tools menu. This can be done by adding the following filter:

add_filter( 'wp_mail_smtp_tasks_admin_hide_as_menu', '__return_false' );

Note: This filter will work if WP Mail SMTP is the only active plugin that includes the Action Scheduler library. If you have other plugins that add the Action Scheduler library, such as WPForms or WooCommerce, the filter likely won’t work as expected.

That’s it! If the steps above were successful, your WordPress site and Action Scheduler should now be working properly.

Next, would you like to know how to set up a mailer in WP Mail SMTP? Be sure to check out our complete guide to WP Mail SMTP mailers for help deciding which mailer is likely to be the best fit for your site.