WHMCS cron jobs come down to one script, crons/cron.php, which the official documentation recommends running every five minutes and at least once an hour. Copy the exact command from Configuration > System Settings > Automation Settings, add it to the server's cron, set Time of Day for the daily billing run, and check the result at Utilities > Automation Status.
What does the WHMCS cron job do?
The WHMCS system cron runs every automated task on a self-hosted install: it generates invoices, captures payments, sends reminders, suspends and terminates overdue services, syncs domains and takes the database backup. Without it, billing is manual. WHMCS Cloud runs the cron for you, so this guide is for self-hosted installs.
Most tasks run once a day. Some can run every few minutes, which is why the cron has to be called often. These examples are from the task list on the System Cron page:
| Task option | What it does | Documented frequency |
|---|---|---|
--CreateInvoices | Generates invoices | Daily |
--ProcessCreditCardPayments | Processes payments | Daily |
--AutoSuspensions | Suspends services that are due for suspension | Daily |
--DatabaseBackup | Creates the database backup you configured | Daily |
--TicketEscalations | Applies ticket escalation rules | As soon as every three minutes |
--RunJobsQueue | Runs queued jobs | As soon as every five minutes |
--DomainStatusSync | Syncs the status of active domains, 50 per run | As soon as every hour |
--CheckForWhmcsUpdate | Checks for WHMCS updates | As soon as every 8 hours |
What is the correct WHMCS cron command?
The documented form is the line below, with the path changed to match your install.
*/5 * * * * php -q /home/username/crons/cron.php
Do not type the path from memory. Go to Configuration > System Settings > Automation Settings, click the first status badge and copy the line shown under Cron Command. Where you paste it depends on the server, as Configure the System Cron Job describes:
- cPanel: open Cron Jobs, choose Once Per Five Minutes and paste the command.
- Plesk: open Scheduled Tasks for the domain, enter the path to
cron.phpas the script path, select a compatible PHP version and set the cron style to*/5 * * * *. - DirectAdmin: open Cron Jobs under Advanced Features. Here the command must include the full path to the PHP binary, for example
/usr/local/bin/php. The path differs by server. - No control panel: run
crontab -eas the account that owns WHMCS and add the line.
A second script, crons/pop.php, is only needed if you import support email by POP3. It also runs every five minutes, and the documentation recommends email piping over it.
WHMCS recommends moving the crons folder above the web root. If you do, set $whmcspath in crons/config.php (renamed from config.php.new), add $crons_dir to configuration.php, and update the cron command.
How often should the WHMCS cron run?
Every five minutes is the recommendation, and once an hour is the documented minimum. A frequent cron does not repeat work, because WHMCS never performs a task more often than that task's own schedule. An hourly cron delays everything that could run every few minutes, such as ticket escalations and the jobs queue. A cron that runs once a day can miss the Time of Day hour, and then the daily tasks do not run.
How do you set the hour for WHMCS daily tasks?
Set Time of Day under Scheduling at Configuration > System Settings > Automation Settings. The default is 9:00am local server time.
- The daily tasks start the first time the cron is called during that hour. If the cron is not called at least once inside the hour, they do not run.
- WHMCS takes the current time from PHP when
cron.phpruns. The timezone configured for WHMCS must match the server's timezone. - When the daily run is missed, WHMCS sends an email titled WHMCS Daily System Cron Attention Needed. The documented fix is a cron entry of
*/5 * * * *.
Where does WHMCS show the cron status?
WHMCS shows it at Utilities > Automation Status, which also opens from the gear icon at the top of the Admin Area. A badge at the top of the page gives the overall state, as explained in Check the Cron Job Status.
| Badge | What it means |
|---|---|
| Green, Ok | The cron was called within the last 120 minutes and the daily tasks ran successfully within the last 24 hours. |
| Yellow, Warning | The cron has run before, but it has not been called in the last 120 minutes. |
| Red, Error or Not Ok | The cron has never been called, or the daily tasks have not run successfully in the past 24 hours. |
Click the badge for a report of recent runs. A failed task shows an x under Status and a Learn more link. After a fix, wait at least five minutes and click Refresh.
The Admin Dashboard also has an Automation Overview widget with seven days of history. The Activity Log at Configuration > System Logs should show entries that begin with Cron Job every day, ending with Cron Job: Completed. Suspensions and terminations that fail are retried daily and listed at Utilities > Module Queue.
Which cron.php options are worth knowing?
Five arguments and a few flags exist, and the documentation says most installs need none of them. The table has the main ones.
| Argument or option | Effect |
|---|---|
all | Runs every task that is due. This is the default when you pass nothing. |
skip --TaskName | Runs everything that is due except the named tasks. |
do --TaskName | Runs only the named tasks. It forces them, and it does not change WHMCS's internal schedule. |
list, help | Lists the arguments, or shows help for one. |
-F, --force | Runs tasks whether or not they are due or already in progress. |
-v, -vv, -vvv | Sets how much output you get. By default a successful run prints nothing. |
--email-report=1 | Sends the digest email for that run. |
Passing arguments needs PHP's register_argc_argv directive enabled. The documented use for skip and do is to give one task its own schedule:
*/5 * * * * php -q /path/to/cron.php skip --AutoSuspensions
0 9 * * 1-5 php -q /path/to/cron.php do --AutoSuspensions
Why is the WHMCS cron job not working?
Usually because the server is not calling cron.php, is calling it at the wrong path, or is running it with a different PHP from the website.
| What you see | Documented cause |
|---|---|
| A warning that the cron has not run in the past two hours | The server is not invoking cron.php. Check the cron entry, then the timezone settings. |
Could not open input file or No input file specified | The path to cron.php in the cron entry is wrong. |
403 Access Denied | The cron was called over HTTP. WHMCS blocks that by default. |
Allowed memory size ... exhausted or Maximum execution time ... exceeded | The PHP that runs the cron has a lower memory or time limit than the run needs. |
Call to undefined function curl_init() | The PHP that runs the cron has no cURL extension. |
| Cron PHP Version Mismatch at Configuration > System Health | The cron and the web server use different PHP versions. |
The last row is worth checking on any server with several PHP versions. Compare Loaded Configuration File at Utilities > System > PHP Info with the output of php -i | grep "Loaded Configuration File", run as the account that owns WHMCS and not as root. Both must point to the same PHP version. The warning clears only after the next daily run.
How do you debug the WHMCS cron?
Run it by hand with full output, following the Cron Failures page.
- Enable Display Errors in the Other tab at Configuration > System Settings > General Settings.
- Copy the Cron Command from Utilities > Automation Status.
- On the server, run
php -i | grep display_errorsto confirm errors will be shown. - Run the command with
all -F -vvvadded to the end. - Read the output. A clean run ends with
[OK] Completed.
php -q /home/example/public_html/whmcs/crons/cron.php all -F -vvv
Because -F forces the daily tasks again, the documentation says not to do this more than once in 24 hours. For a cron that fails only sometimes, append -vvv >> crondebug.txt to the scheduled command, wait until the Time of Day hour has passed and read the file. I turn Display Errors off again when I am finished.
What are the risks of changing the WHMCS cron setup?
The main risk is that billing tasks run outside their schedule, or stop running.
- Forcing tasks.
-Fanddorun tasks that are not due. Know which task you are forcing on a live install. - HTTP calls. If the host gives you no crontab, allow only the scheduler's IP address in Cron HTTP Access Restriction on the Security tab of General Settings.
- A moved crons folder. After each WHMCS update, the updated crons files have to be copied to the custom location, or automation breaks.
- Custom hooks. The cron hook reference says
AfterCronJobruns each time the cron is called andDailyCronJobruns at the end of the daily run. Slow code on the first one runs every five minutes. My WHMCS hooks guide has more on this.
An earlier version of this guide described a separate email queue cron and a flock wrapper. I could not confirm either in the official documentation, so both are gone.
If the cron on your install still fails after these checks, I diagnose it as a hourly WHMCS developer work or under WHMCS support and maintenance, with a free scoping call of about 30 minutes and a written quote within one business day.
Last reviewed 10 October 2026. Disclosure: I am a freelance WHMCS developer and I sell WHMCS troubleshooting and maintenance, so I am not neutral. I am CTO at ElySpace, a freelance developer for Marmaids LLC, and founder of WHMCSPilot and MagizAI. Commands, paths and settings come from the WHMCS 9.0 documentation as I read it on that date.