Get started

WHMCS cron job not running? How to find the cause and fix it

No invoices, no suspensions, a red Automation Status badge: the WHMCS cron has stopped. Check the command, run it by hand to see the real error, and fix it.

3 December 2026 · 6 min read

When the WHMCS cron stops, nothing looks broken at first. The admin area loads and clients can still log in. Then invoices are not generated, overdue services are not suspended, domain renewal notices are not sent and payments are not captured. WHMCS depends on one scheduled command, crons/cron.php, to do all of that automatically.

This guide follows WHMCS’s own System Cron and Cron Failures documentation. It applies to self-hosted WHMCS; on WHMCS Cloud, WHMCS runs the cron for you.

Confirm that the cron is the problem

Go to Utilities » Automation Status, or click the gear icon at the top of the admin area. The badge at the top tells you where you stand:

  • Green, Ok: the cron was invoked within the last 120 minutes and the daily tasks ran successfully within the last 24 hours.
  • Yellow, Warning: the cron worked before, but has not been invoked in the last 120 minutes.
  • Red, Error: the cron has never been invoked, or the daily tasks have not completed in the last 24 hours.

Click the badge for a report of recent runs. Failed tasks show an x, with a Learn more link. Also open Configuration » System Logs: each day should end with the entry Cron Job: Completed. No Cron Job entries at all means the server is not calling the cron.

Set up the cron command correctly

Most failures come from the command itself. Copy the exact command WHMCS generates for your installation from Configuration » System Settings » Automation Settings (click the first badge, then the copy icon next to Cron Command). It looks like this:

*/5 * * * * php -q /home/username/crons/cron.php

WHMCS recommends running it every five minutes, and at least once an hour if your host allows nothing more frequent. In cPanel:

  1. Open Advanced » Cron Jobs in the cPanel account that hosts WHMCS.
  2. Under Common Settings, choose Once Per Five Minutes.
  3. Paste the cron command into Command and click Add New Cron Job.
  4. Delete any older WHMCS cron lines, so the task is not scheduled twice with different paths.

“No input file specified” or “Could not open input file”

Both mean the path to cron.php is wrong. This often happens after you move the crons folder outside the web root, which WHMCS recommends for security, or after moving WHMCS to a new account. Correct the path in the cron job.

Run the cron by hand to see the real error

If the command is right but the badge stays red, run it yourself with full output. WHMCS’s steps:

  1. Enable Display Errors under Configuration » System Settings » General Settings » Other.
  2. Over SSH, as the account user, check PHP will print errors: php -i | grep display_errors
  3. Paste the cron command and add all -F -vvv at the end:
    php -q /home/username/crons/cron.php all -F -vvv
  4. A healthy run ends with a green [OK] Completed. Anything else is the error to fix.

-F forces every task to run, even daily tasks that already ran today. WHMCS warns not to do this more than once in 24 hours, so you do not send duplicate reminders or invoices. Turn Display Errors off again when you are done.

Common errors and their fixes

The cron uses a different PHP version from the website

The php command in a cron job does not always run the same PHP version, or load the same php.ini, as your website. WHMCS shows a Cron PHP Version Mismatch warning under Configuration » System Health when they differ. Compare the Loaded Configuration File in Utilities » System » PHP Info with what the command line uses, then follow WHMCS’s guide to resolve a cron PHP mismatch. On cPanel, set the version in MultiPHP Manager. The System Health warning only clears after the next daily run.

This matters most right after a PHP upgrade, because the command-line PHP must also have a matching ionCube Loader. If you are upgrading WHMCS itself, the order we use is in our guide to upgrading from WHMCS 9.0 to 9.1.

Allowed memory size exhausted

Fatal error: Allowed memory size of 33554432 bytes exhausted means PHP stopped the cron at a 32 MB memory limit. WHMCS recommends 128 MB, with 64 MB as a minimum. Raise memory_limit for the PHP version, or set it in the command:

php -d memory_limit=128M -q /home/username/crons/cron.php

Maximum execution time exceeded

A Whoops\Exception\ErrorException about a 30-second maximum execution time means PHP stopped the run. Raise max_execution_time for the PHP version the cron uses.

Call to undefined function curl_init()

The cURL extension is missing from the command-line PHP. Enable it for that PHP version.

Could not connect to database

cron.php cannot reach MySQL. Check the database details in configuration.php and that the database server is running.

The daily tasks run at the wrong hour

If WHMCS emails you that the Daily System Cron did not run during the hour you set, the cron schedule usually does not run during that hour. Set the job to */5 * * * *, and check that WHMCS’s timezone matches the server’s. The Time of Day setting is under Automation Settings.

After the fix

Wait at least five minutes, then click Refresh in Automation Status. Once the badge is green, check that the invoices, suspensions and reminders that were missed are now done. If one specific task keeps failing, the cron can run it on its own with do, for example cron.php do --CreateInvoices.

Frequently asked questions

How often should the WHMCS cron run?

Every five minutes, according to WHMCS. If your host does not allow that, run it as often as allowed and at least once an hour.

Where do I find the correct WHMCS cron command?

Go to Configuration » System Settings » Automation Settings and click the first badge. The Cron Command is shown with a copy icon.

Why are WHMCS invoices not being generated?

Invoice generation is a daily cron task. If the cron is not running, or the daily run fails, no invoices are created. Check Utilities » Automation Status first.

Can I run the WHMCS cron from a URL instead?

By default, WHMCS blocks HTTP requests to cron.php with a 403 error. You can allow a specific scheduler by adding its IP address to Cron HTTP Access Restriction in the Security tab of General Settings, but the command line is the method WHMCS’s documentation recommends.

Is it safe to force the cron with -F?

Use it for troubleshooting only, and not more than once in 24 hours, because it reruns daily tasks that may already have run.

WHMCS help from HosterOcean

Our reseller hosting comes with WHM and a free WHMCS licence, so billing, provisioning and the cron all run from the same cPanel account. If your WHMCS needs more than a fix, such as a custom module, a provisioning workflow or an upgrade, our WHMCS development team can build it, and our WHMCS WhatsApp module sends invoices and ticket replies to your customers on WhatsApp. Stuck on a cron error? Open a ticket with the output of the manual run and we will look at it.

Tags:

WHMCS cron not running

WHMCS automation status

WHMCS cron command cPanel

WHMCS PHP version mismatch

WHMCS development

Technical Guide

WHMCS 9.0 reaches end of life on 31 December 2026: how to upgrade to WHMCS 9.1 safely

Install ionCube Loader 15 first, then WHMCS 9.1, then PHP 8.4, in that order.

Read More →

Business Guide

How to start a web hosting reseller business with WHM and WHMCS

Create packages in WHM, connect WHMCS with an API token, and let paid orders create cPanel accounts automatically.

Read More →