Cronix PRO adds the wp cronix command group with 11 subcommands. Manage your entire cron schedule from the terminal — perfect for deployment scripts, automation, and server-side maintenance.
#Commands
| Command | Description |
|---|---|
wp cronix list |
List all events. Flags: --format=table|json|csv, --status=all|active|paused|overdue |
wp cronix add <hook> |
Create an event. Flags: --schedule=hourly, --args='{}', --next=timestamp |
wp cronix run <hook> |
Fire an event immediately |
wp cronix pause <hook> |
Pause an event |
wp cronix resume <hook> |
Resume a paused event |
wp cronix delete <hook> |
Remove an event. Add --force to skip the confirmation prompt |
wp cronix health |
Print the health score and factor breakdown |
wp cronix orphans |
Subcommands: list, cleanup |
wp cronix duplicates |
List duplicate events |
wp cronix snapshot |
Subcommands: take <name>, list, restore <id>, delete <id> |
wp cronix setting |
Subcommands: get <key>, set <key> <value>, reset <key> |
#Examples
# List all overdue events as JSON
wp cronix list --status=overdue --format=json
# Run a specific hook immediately
wp cronix run woocommerce_cleanup_sessions
# Take a snapshot before deploying
wp cronix snapshot take "pre-deploy-v2.1"
# Check health and output as JSON for monitoring scripts
wp cronix health --format=json
# Detect and clean orphaned hooks
wp cronix orphans list
wp cronix orphans cleanup
wp cronix snapshot take "pre-deploy" to your deployment script before running database migrations or plugin updates. It takes under a second and gives you a rollback point.#Output Formats
Most commands support three output formats:
--format=table(default) — human-readable table for terminal output--format=json— machine-readable JSON for scripts and monitoring tools--format=csv— comma-separated values for spreadsheet export
#Using in Deployment Scripts
#!/bin/bash
# Example deployment script with Cronix PRO
# 1. Take a pre-deploy snapshot
wp cronix snapshot take "pre-deploy-$(date +%Y%m%d-%H%M)"
# 2. Check health score before deploying
HEALTH=$(wp cronix health --format=json | python3 -c "import sys,json; print(json.load(sys.stdin)['score'])")
if [ "$HEALTH" -lt 70 ]; then
echo "Warning: health score is $HEALTH — review before deploying"
fi
# 3. Your deploy steps here...
--format=json output makes WP-CLI commands easy to parse in scripts. Pipe the output through jq or Python to extract specific values for conditional logic.Last updated
Was this article helpful?
On this page