Troubleshooting Background Jobs #
If background jobs are not running or producing unexpected results, use this guide to diagnose and resolve the issue.
What DMSI Service Management Adds
All troubleshooting in this section applies to the 8 jobs added by this extension.
Jobs Are Not Running At All #
Most common cause: WooCommerce is not active.
Action Scheduler is bundled with WooCommerce. If WooCommerce is deactivated, Action Scheduler stops running and all 8 background jobs stop executing.
Resolution:
1. Confirm WooCommerce is active at Plugins > Installed Plugins.
2. If WooCommerce was recently deactivated and reactivated, navigate to any admin page to trigger the admin_init self-healing check, which will re-register any missing jobs.
Verifying Jobs Are Registered #
To confirm jobs are registered in Action Scheduler:
- In the WordPress admin sidebar, navigate to Tools > Scheduled Actions.
- Search for group
dmsi-sm. - You should see 8 recurring actions listed.
If fewer than 8 are listed, navigate to any admin page with Service Management active — the self-heal logic on admin_init will re-register missing jobs.
Jobs Are Registered But Not Running #
Possible cause: The WordPress cron system is disabled or Action Scheduler’s runner is not being triggered.
Action Scheduler uses WordPress’s wp-cron system as its fallback trigger. If your server has DISABLE_WP_CRON set to true in wp-config.php and no server-side cron job is configured, Action Scheduler will not run.
Resolution:
– Check wp-config.php for define('DISABLE_WP_CRON', true).
– If present, configure a real server-side cron job that runs wp-cron.php every minute, or every 5 minutes at minimum.
Emails Are Not Being Sent #
Emails are queued by background jobs and sent via Action Scheduler. If emails are not arriving:
- Confirm WooCommerce is active (see above).
- Check Tools > Scheduled Actions for pending email actions — a large queue of pending items indicates jobs are queuing but not running.
- Confirm the notification type is enabled in Services > Settings > Notifications.
- Confirm the customer’s email address is valid and not on a bounce list.
- Check your server’s SMTP configuration — Action Scheduler passes emails to
wp_mail(), which depends on your WordPress email configuration.
Jobs Are Running But Results Seem Wrong #
Example: Hour alerts not firing despite usage above threshold.
Each job uses deduplication logic to avoid duplicate alerts. If an alert was already sent for a given threshold crossing, it will not fire again for the same event.
Resolution: Check the contract’s metadata in the database for alert flags. If the flag is set but the alert was not received, the issue is likely email delivery rather than job execution.
Fire-and-Forget Behavior #
Service Management background jobs do not retry on failure. If a job encounters an exception (database error, network timeout, invalid data), the exception is logged to the plugin activity log but the job does not reschedule itself for retry. The next scheduled run of the same job will attempt the same checks again from scratch.
To review job exceptions, navigate to Tools > Scheduled Actions, filter by group dmsi-sm, and review the Failed tab.
