WordPress plugin that replaces WP-Cron with an event-loop job queue powered by Workerman. Executes WP Cron and Action Scheduler jobs at exact scheduled times with zero polling. Provides a WP-CLI interface and admin dashboard for monitoring.
composer install # Install PHP dependencies
pnpm install --frozen-lockfile # Install Node.js dev dependencies
pnpm run build # Minify CSS and JS assets
pnpm run css:build # Minify admin.css → admin.min.css
pnpm run js:build # Minify admin.js → admin.min.js
pnpm run archive # Build distributable zip (composer install + build + zip)the-perfect-wp-cron/
├── the-perfect-wp-cron.php # Plugin entry point
├── src/
│ ├── class-config.php # Configuration
│ ├── class-cron-interceptor.php # Hooks into WP Cron scheduling
│ ├── class-action-scheduler-bridge.php # Action Scheduler integration
│ ├── class-admin-page.php # Dashboard UI + AJAX handlers
│ ├── class-cli-commands.php # WP-CLI `wp queue` commands
│ ├── class-job-log.php # Job execution logging + cleanup
│ └── ... # Worker and queue management classes
├── assets/
│ ├── admin.css # Admin dashboard styles (source)
│ ├── admin.js # Admin dashboard JS (source)
│ ├── admin.min.css # Minified (release build only)
│ └── admin.min.js # Minified (release build only)
├── bin/ # Worker entry points
├── .distignore # Files excluded from distribution zip
├── composer.json
└── package.json
- PHP version: >= 8.1
- Autoloading: Classmap (
src/directory) - Namespace prefix:
QueueWorker\ - Constants prefix:
QW_ - No PHPCS config — follow WordPress Coding Standards conventions
- Text domain: Inherits from WordPress core context
- Network plugin:
Network: true
- Registers on
inithook via staticCron_Interceptor::register() - Action Scheduler bridge registers on
action_scheduler_init - WP-CLI commands under
wp queuenamespace - Worker process detection via
QUEUE_WORKER_RUNNINGconstant - Job log table created on activation, cleaned daily via cron
- Admin page registered on
network_admin_menu(multisite) oradmin_menu
*.min.jsand*.min.cssfiles are generated during release builds — do not commit on feature branches- The
bin/directory contains Workerman worker entry points .distignorelists files excluded from the release zip