WHMAZ needs one cron job. A single daily call to /cronjobs/run executes every automated task in order. Until this exists, no renewal invoice is ever generated and no overdue service is ever suspended.
Find your cron secret key
Go to Settings → Automation and copy the cron secret key. The endpoint is protected by it, and you pass it as the key parameter.
Setting it up in cPanel
- Log in to cPanel and open Cron Jobs.
- Choose Once Per Day — 3:00 AM is a sensible slot.
- Enter the command, substituting your domain and key:
curl -s "https://yourdomain.com/cronjobs/run?key=YOUR_CRON_SECRET_KEY" >/dev/null 2>&1
Setting it up on a Linux server
Run crontab -e and add:
# WHMAZ automation - runs all tasks daily at 3:00 AM
0 3 * * * curl -s "https://yourdomain.com/cronjobs/run?key=YOUR_CRON_SECRET_KEY" >/dev/null 2>&1
Or call the CLI directly, which does not require the key:
0 3 * * * php /path/to/whmaz/index.php cronjobs run >/dev/null 2>&1
Individual endpoints
Running everything through /cronjobs/run is recommended, but each task can be scheduled separately if you prefer. Each also takes ?key=:
/cronjobs/run— all automated tasks/cronjobs/generateRenewalInvoices— renewal invoices only/cronjobs/suspendOverdueServices— overdue suspension only/cronjobs/terminateOverdueServices— grace-period termination only
Keep the secret key out of anywhere public. Anyone who has it can trigger your automation at will.