When invoices stop being generated, overdue accounts are not suspended or ticket emails do not import, the WHMCS cron is almost always the culprit. This guide gives a systematic way to find out whether the cron runs at all, whether it fails, and how to fix the usual causes.
Before you start
- WHMCS admin access and access to your hosting control panel's cron settings.
- SSH access helps a lot, but most checks also work without it.
Check the symptoms in WHMCS
- Open Utilities → Automation Status. It shows when the cron last ran and what each daily task did.
- Open Utilities → System → System Health. A warning like "The cron has not run in the last 24 hours" confirms the problem.
- Look at Utilities → Logs → Activity Log for entries such as "Cron Job: Starting". No entries means the cron never starts.
Verify the cron entry
- Compare your control panel's cron job with the command shown under Configuration → System Settings → Automation Settings.
- The schedule should be every 5 minutes:
*/5 * * * *. - The path to
cron.phpmust be absolute and correct. If you moved thecronsfolder, check thatcrons/config.phppoints to the WHMCS directory.
Run the cron manually
Over SSH, run the exact command with verbose output:
/usr/local/bin/php -q /home/user/whmcs_data/crons/cron.php all -vvvWithout SSH, temporarily set the cron to email output (remove >/dev/null 2>&1) and read the message you receive. The output tells you exactly what fails.
Common causes and fixes
| Error or symptom | Fix |
|---|---|
| "requires the ionCube PHP Loader" | The command-line PHP differs from the web PHP. Use the full path of the right version, e.g. /opt/cpanel/ea-php82/root/usr/bin/php or /opt/alt/php82/usr/bin/php on CloudLinux. |
| "Could not open input file" | Wrong path to cron.php. |
| "Allowed memory size exhausted" | Add -d memory_limit=512M after the PHP binary. |
| Runs but daily tasks skipped | Daily tasks already ran today, or the Time of Day has not been reached. Force with cron.php do --force. |
| "Unable to acquire lock" | A previous run is stuck. Wait, or clear stale locks per WHMCS docs; check for long tasks such as domain sync. |
| Licence error in output | The CLI hits a different directory or IP than the licence. Reissue the licence. |
| Cron disabled by host | Your hosting plan may block cron; ask support. |
Run specific tasks
WHMCS's cron accepts commands so you can test parts separately:
cron.php list– show available tasks.cron.php do --CreateInvoices– run only invoice generation.cron.php skip --DomainStatusSync– skip a slow task while testing.
After fixing
- Wait for the next 5-minute run and recheck Automation Status.
- Review invoices that should have been generated. WHMCS catches up on most tasks on the next daily run, but reminders for past days are not resent.
- Silence output again once it works.
