Background Jobs Not Running #
DMSI Service Management relies on 8 background jobs for alerts, renewals, SLA compliance, and email delivery. If these jobs are not running, key features of the plugin will not function correctly.
What DMSI Service Management Adds
All 8 background jobs are new to this extension. Core does not use background jobs.
Signs That Jobs Are Not Running #
- Hour alert emails are not being sent even though contracts are above threshold
- Asset expiration reminders are not arriving
- Overdue requests are not being flagged
- The satisfaction survey emails are queued in Action Scheduler but the queue is not draining
- SLA breach alerts are not being generated
Diagnosis Step 1: Is WooCommerce Active? #
Navigate to Plugins > Installed Plugins and confirm WooCommerce shows as Active. This is the most common cause of all background jobs stopping simultaneously.
Diagnosis Step 2: Are Jobs Registered? #
Navigate to Tools > Scheduled Actions and search for group dmsi-sm. You should see 8 recurring actions. If fewer than 8 appear:
- Navigate to any admin page within the WordPress admin area.
- The
admin_inithook will fire and the plugin’s self-healing logic will re-register any missing jobs. - Return to Tools > Scheduled Actions and refresh — the missing jobs should now appear.
Diagnosis Step 3: Are Jobs Running? #
In the Tools > Scheduled Actions interface:
- Select group
dmsi-sm. - Switch to the Complete tab — completed runs should be listed with timestamps.
- If no completed runs appear and jobs are registered, Action Scheduler is not executing.
Diagnosis Step 4: Is WP-Cron Working? #
Action Scheduler depends on WordPress’s cron mechanism to trigger its queue runner.
Check wp-config.php for:
define('DISABLE_WP_CRON', true);
If this line exists, WordPress cron is disabled. You must configure a real server-side cron job to call wp-cron.php at regular intervals (every 1-5 minutes is recommended).
Example cron entry (Linux):
*/5 * * * * /usr/bin/php /path/to/wordpress/wp-cron.php
Or using WP-CLI:
*/5 * * * * wp cron event run --due-now --path=/path/to/wordpress
Self-Healing Behavior #
Jobs are designed to self-heal: if a job is missing from the queue, it will be re-added automatically on the next admin page load. This prevents permanent loss of jobs due to transient database issues or plugin reactivation sequences.
