Documentation

✉️ Email Delivery

Documentation, reference material and tutorials for CRM-NG SMTP Email: setup guides for every mail service, troubleshooting, and one article per error message.

Scheduled actions

Updated

By Duane GarnerChief Executive Officer (CEO)
Summarize: Claude ChatGPT View Markdown
On this page

Understand the background tasks CRM-NG SMTP runs, read their status on Tools → Scheduled Actions, and get the queue moving again when it stalls.

Some of CRM-NG SMTP's work happens in the background, away from the pages your visitors load. The Scheduled Actions tab shows that background work and whether it is keeping up. This article explains what the tasks are, how to read the list, and what to do when tasks pile up. It is for administrators and developers checking that queued emails and weekly jobs actually run.

What the queue does

CRM-NG SMTP uses Action Scheduler, a widely used background task library for WordPress, to run jobs such as:

Task name What it does When it exists
crmng_smtp_queue_process Checks the email queue about once a minute While Optimize Email Sending is on
crmng_smtp_send_enqueued_email Sends one queued email One per queued email
crmng_smtp_queue_cleanup Removes finished entries from the queue once a day While Optimize Email Sending is on
crmng_smtp_summary_report_email Sends the weekly Email Summaries on Mondays While Email Summaries are on
crmng_smtp_process_debug_events_cleanup Deletes debug events older than the retention period When a retention period other than Forever is set

The email log cleanup and the email log's own weekly summary use WordPress's built-in scheduler (WP-Cron) instead, so they are not listed here.

Open the tab

Go to CRM-NG SMTP → Tools → Scheduled Actions. The tab opens with a search for crmng_smtp already applied, so you only see CRM-NG SMTP's tasks. Remove the search with the small cross next to Search results for to see everything.

Other plugins use it too

Action Scheduler is shared. WooCommerce and many other plugins use it, so without the search you will see their tasks as well. Leave those alone.

Reading the list

Each row is one task run. The main columns are the task name (the Hook), its Status, its arguments, its group, when it is or was scheduled, and its log.

The status links above the list filter by state:

Status Meaning
Pending Waiting for its scheduled time
In-progress Running now
Complete Finished successfully
Failed Started but hit an error. Open its log to see why.
Canceled Called off, for example because you turned a feature off
Past-due Its time has passed but it has not run yet

A few Pending tasks are normal: the next queue check, next Monday's summary, and so on. Finished queue checks are tidied away automatically, so the list does not grow forever.

Signs the queue has stalled

  • Many tasks marked Past-due, especially crmng_smtp_send_enqueued_email.
  • Emails arriving long after they were sent, or not at all, while Optimize Email Sending is on.
  • The weekly summary not arriving on Monday.

Why it stalls

Action Scheduler is woken up by visits to your site, the same way WP-Cron is. It stalls when:

  • Your site has very few visitors, so nothing triggers the queue for long stretches.
  • WP-Cron is turned off with define( 'DISABLE_WP_CRON', true ); in wp-config.php, but no real server cron job was set up to replace it.
  • Your host blocks your site from calling itself (loopback requests), which background processing relies on.
  • A task keeps failing, for example because of a fatal error in another plugin.

Getting it moving again

  1. Run the queue now

    Hover over a pending CRM-NG SMTP task and choose Run. This proves the task itself works.

  2. Add a real cron job

    Ask your host to call https://www.example.com/wp-cron.php?doing_wp_cron every minute or every five minutes, using your own address. This is the reliable fix for quiet sites and sites with WP-Cron off.

  3. Check loopback requests

    Go to Tools → Site Health in WordPress. If it reports that loopback requests fail, ask your host to allow them.

  4. Read failed task logs

    Open any Failed task and read its log for the error.

If you use WP-CLI, wp action-scheduler run processes due tasks from the command line, which also suits a server cron job.

Quick workaround

If queued emails are stuck and you need mail flowing now, switch Optimize Email Sending off on the Misc tab. New emails are then sent straight away. Already-queued emails are still sent by the queue, so keep reading until it is healthy.

Go to Top