Black Friday: 79% off every plugin Shop the sale →

Background Scans and Scheduling

Background continuation#

There is no separate scheduling screen. Every scan you start is automatically backed by a queued background job, so it finishes even if you close the browser:

  1. When you click Run scan, the plugin queues a single background action on the ers_process_scan_chunk hook.
  2. While the scan page is open, the page drives the scan over AJAX and the background job stays idle.
  3. If no admin request arrives for 60 seconds, the background job takes over and runs chunks of up to 20 seconds, re-queuing itself until the scan is complete.
  4. When the scan ends (complete, cancelled or stopped), any remaining queued action is removed.

The plugin uses Action Scheduler when another plugin provides it (for example WooCommerce), because it is more reliable than WP-Cron on busy sites. Otherwise it uses WP-Cron.

Recurring scans#

The plugin does not run scans on a recurring schedule by itself. To scan regularly, for example before every weekly maintenance window, use the WP-CLI command from a system cron job:

# Every Monday at 06:00, save a JSON report
0 6 * * 1 wp --path=/var/www/html editor-readiness scan --format=json > /var/backups/editor-readiness-$(date +\%F).json

See WP-CLI for the command’s options and its limitations compared with an admin scan.

Was this article helpful?