WHMCS Cron Job: The Command, Status Checks and Common Fixes
The WHMCS cron command, how often it must run, how to read Automation Status, and fixes for the errors that stop it, from path mistakes to PHP version mismatches.
The WHMCS cron command, how often it must run, how to read Automation Status, and fixes for the errors that stop it, from path mistakes to PHP version mismatches.
The WHMCS cron job is a system cron entry that runs crons/cron.php with PHP's command-line binary every five minutes, for example */5 * * * * php -q /home/username/crons/cron.php. WHMCS shows the exact command for your installation under Configuration, System Settings, Automation Settings. If the cron does not run at least once an hour, and at least once during the hour you set as Time of Day, invoices, reminders, card charges and suspensions stop happening.
How this was sourced. FluxBilling publishes this guide and sells billing software that competes with WHMCS. Every command, error and setting below comes from the WHMCS 9.1 documentation on docs.whmcs.com, read on 23 November 2026. It applies to self-hosted WHMCS only: WHMCS Cloud sets up the cron for you. The guide covers the command, the schedule, how to check the status, the common errors and their fixes, and how a platform with a built-in scheduler differs.
Almost everything WHMCS does while nobody is logged in. One script, cron.php, decides on each run which tasks are due. Most run once a day, some every few minutes, a few once a month.
| Task (cron.php option) | What it does | Frequency |
|---|---|---|
| --CreateInvoices | Generates renewal invoices | Daily |
| --ProcessCreditCardPayments | Charges stored payment methods | Daily |
| --InvoiceReminders | Unpaid and overdue reminders | Daily |
| --AutoSuspensions, --AutoTerminations | Suspends and terminates overdue services | Daily |
| --TicketEscalations | Applies escalation rules | As often as every three minutes |
| --RunJobsQueue, --ProcessEmailQueue | Queued jobs and campaign emails | As often as every five minutes |
| --DomainStatusSync | Syncs active domain statuses | As often as every hour |
| --OverageBilling | Bills overage usage | Monthly |
WHMCS never runs a task more often than its schedule allows, so calling the script every five minutes is safe.
Copy it from Configuration, System Settings, Automation Settings, by clicking the first badge. On a typical server it looks like this:
*/5 * * * * php -q /home/username/crons/cron.php
In cPanel, add it under Advanced, Cron Jobs with "Once Per Five Minutes". In Plesk, add a Scheduled Task with the script path, a compatible PHP version and the cron style */5 * * * *. In DirectAdmin, use the full path to the PHP binary, such as /usr/local/bin/php. Without a panel, run crontab -e as the account that owns WHMCS and add the line there.
Use the command line, not a web request. By default WHMCS answers direct HTTP requests to cron.php with 403 Access Denied, unless the caller's IP address is listed in the Cron HTTP Access Restriction setting.
Every five minutes. The documented minimum is once an hour, but frequent tasks such as ticket escalations and the jobs queue only keep up at the recommended interval.
The daily tasks run once, at the hour set in Time of Day under Automation Settings. The default is 9:00 local server time. The tasks start the first time the cron is invoked during that hour, so a cron that runs only at 8:00 and 10:00 never runs them at all. WHMCS uses the PHP time when cron.php runs, so the WHMCS timezone must match the server's.
Open Utilities, Automation Status, or click the gear icon in the admin area. The badge at the top tells you where to look.
| Badge | Meaning |
|---|---|
| Ok (green) | Cron invoked within the last 120 minutes and the daily tasks ran within 24 hours |
| Warning (yellow) | Cron ran before, but not in the last 120 minutes |
| Error (red) | Cron never invoked, or the daily tasks have not run in 24 hours |
Also check the Activity Log under Configuration, System Logs. Each day should show entries starting with "Cron Job" and end with "Cron Job: Completed". No such entries means the cron job itself is not configured. After a fix, wait five minutes and click Refresh on Automation Status.
The exact message decides the fix. These seven come from the cron troubleshooting section of the WHMCS documentation:
| Error or symptom | Cause | Fix |
|---|---|---|
| No input file specified, or Could not open input file | Wrong path to cron.php | Correct the path in the cron command |
| Unable to communicate with the WHMCS installation | Moved crons folder cannot find WHMCS | Set $whmcspath in crons/config.php |
| Allowed memory size of 33554432 bytes exhausted | memory_limit is 32 MB | Raise it to 128 MB, or 64 MB at least |
| Maximum execution time of 30 seconds exceeded | max_execution_time is 30 | Use 120, or 300 on large installations |
| Call to undefined function curl_init() | cURL missing in the CLI PHP | Install cURL and enable curl_init for that PHP |
| Daily System Cron Attention Needed email | Cron did not run during the Time of Day hour | Run it every five minutes |
| Daily run slow at Executing System Queue | Database backups on a large database | Clean up the database, turn off FTP and email backups |
For memory and time limits you can also set the value in the command itself:
php -d memory_limit=128M -d max_execution_time=300 -q /path/to/whmcs/crons/cron.php
Many servers run a different PHP binary and php.ini on the command line than in the web server. WHMCS 9.1 supports PHP 8.2, 8.3 and 8.4 with ionCube Loader 15 or later, and both sides must use the same version.
/opt/cpanel/ea-php83/root/etc/php.ini means PHP 8.3.php -i | grep "Loaded Configuration File".date.timezone on both sides too. A timezone mismatch makes the daily run miss its hour.The System Health warning is cached and only clears after the next daily run.
Turn on Display Errors under General Settings, Other, then run the command with all tasks, forced, at maximum verbosity:
php -q /home/example/public_html/whmcs/crons/cron.php all -F -vvv
It ends with a green [OK] Completed when everything works. WHMCS says not to do this more than once in 24 hours, because -F forces the daily tasks again. If it succeeds by hand but fails on schedule, append -vvv >> crondebug.txt to the scheduled command and read the file after the Time of Day hour.
To give one task its own schedule, skip it in the main command and run it with do, for example cron.php skip --AutoSuspensions every five minutes plus 0 9 * * 1-5 php -q /path/to/cron.php do --AutoSuspensions for weekday mornings only.
WHMCS recommends moving crons above the web root. Move the folder, rename config.php.new to config.php and set $whmcspath in it, add $crons_dir to configuration.php, then update the cron command and any email piping forwarders. After every WHMCS update, copy the new crons files into the custom folder, or automation breaks. Our WHMCS security checklist covers the other hardening steps, and the guide to moving WHMCS to a new server covers re-creating the cron after a move.
FluxBilling runs its scheduler inside the application, so there is no crontab line and no command-line PHP to keep in step with the web server, on our cloud or on a self-hosted install. All billing lifecycle work runs in one daily pass at an hour you pick in UTC: renewal documents, automatic charges, suspension, termination, reminders and a billing integrity check that compares documents with the money recorded against them.
Only one pass runs at a time, and a failing step does not stop the steps after it. If the platform was down at the scheduled hour, it runs the pass as a catch-up when it starts, once 23 hours or more have passed since the last completed one. Hourly services have their own pass every hour, on the hour.
The trade-off is control. WHMCS lets you skip, force or separately schedule any task. FluxBilling runs one daily pass in a fixed order.
Daily automation runs at 9:00 local server time by default. Change it under Automation Settings, Time of Day, and make sure the cron runs at least once in that hour.
Yes. WHMCS never runs a task more often than its own schedule, and ticket scheduled actions can run as often as every minute. Every five minutes is the documented recommendation.
Check whether the cron ran during the Time of Day hour. If it did not, the daily tasks, invoice generation included, did not run. The Automation Status badge and the Activity Log entry "Cron Job: Completed" show it.
No. WHMCS Cloud handles automation and the system cron itself. The steps in this guide are for self-hosted installations.
Only if the caller's IP address is in the Cron HTTP Access Restriction setting. Otherwise WHMCS returns 403 Access Denied, so the command line is the safer choice.
If you would rather not maintain a cron job, a PHP version and a crons folder alongside your billing, see what changes on our WHMCS alternative page. The official WHMCS System Cron documentation lists every task and option.
WHMCS, cPanel, Plesk and DirectAdmin are trademarks of their respective owners. FluxBilling is not affiliated with or endorsed by any of them.
WHMCS's own 12-step server move, with the requirements for 8.13 and 9.0, the encryption hash you must not lose, and a table of the errors that follow a move and how to fix each one.
The ten hardening steps WHMCS recommends for self-hosted installs, plus admin 2FA, API credentials, updates, configuration backups and what to do after a compromise.
Compare WHMCS and FluxBilling side by side. Architecture, pricing, DCIM, plugins, and what hosting providers should consider when evaluating billing platforms in 2026.
Every WHMCS self-hosted and Cloud price for 2026, what the 1 January increase added, and what 250, 500 and 1,000 clients cost a year — read from whmcs.com on 25 September 2026.
WHMCS charges by active clients and can host the software for you. WiseCP is self-hosted with unlimited clients and lifetime licences until 1 January 2027. Prices, modules, WISECP 5 and the WHMCS importer compared.