Background Export Processing Cron #
For large data exports (especially Excel files with many rows), DMSI Analytics can offload export generation to a background WP-Cron job.
Schedule #
| Property | Value |
|---|---|
| WP-Cron hook | dmsi_analytics_process_export |
| Frequency | On-demand (scheduled when a large export is triggered) |
| Handler | Export_Engine::run_background_export() |
How It Works #
When you click an Export button:
- If the export is small enough (CSV or JSON with fewer than 10,000 rows), it is generated synchronously and downloaded immediately
- If the export is large, a background job is scheduled via WP-Cron
- You receive a notification email when the export is ready, with a temporary download link
- A companion cron (
dmsi_analytics_cleanup_exports) removes expired export files after 24 hours
When Background Mode Triggers #
Background export is triggered automatically when:
– An Excel export exceeds 5,000 rows
– A JSON export exceeds 10,000 rows
– Server execution time limits would prevent synchronous completion
You do not need to configure this; it happens automatically.
