Skip to content
Shahid Malla

WHMCS Cron Jobs: Command, Frequency, Status and Debugging

The WHMCS cron setup checked against the official documentation: the command to copy, how often to run it, the Time of Day setting, where status is reported, cron.php options and debugging.

· Published · Updated · 8 min read
On this page (9 sections)

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 optionWhat it doesDocumented frequency
--CreateInvoicesGenerates invoicesDaily
--ProcessCreditCardPaymentsProcesses paymentsDaily
--AutoSuspensionsSuspends services that are due for suspensionDaily
--DatabaseBackupCreates the database backup you configuredDaily
--TicketEscalationsApplies ticket escalation rulesAs soon as every three minutes
--RunJobsQueueRuns queued jobsAs soon as every five minutes
--DomainStatusSyncSyncs the status of active domains, 50 per runAs soon as every hour
--CheckForWhmcsUpdateChecks for WHMCS updatesAs 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.php as 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 -e as 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.php runs. 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.

BadgeWhat it means
Green, OkThe cron was called within the last 120 minutes and the daily tasks ran successfully within the last 24 hours.
Yellow, WarningThe cron has run before, but it has not been called in the last 120 minutes.
Red, Error or Not OkThe 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 optionEffect
allRuns every task that is due. This is the default when you pass nothing.
skip --TaskNameRuns everything that is due except the named tasks.
do --TaskNameRuns only the named tasks. It forces them, and it does not change WHMCS's internal schedule.
list, helpLists the arguments, or shows help for one.
-F, --forceRuns tasks whether or not they are due or already in progress.
-v, -vv, -vvvSets how much output you get. By default a successful run prints nothing.
--email-report=1Sends 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 seeDocumented cause
A warning that the cron has not run in the past two hoursThe server is not invoking cron.php. Check the cron entry, then the timezone settings.
Could not open input file or No input file specifiedThe path to cron.php in the cron entry is wrong.
403 Access DeniedThe cron was called over HTTP. WHMCS blocks that by default.
Allowed memory size ... exhausted or Maximum execution time ... exceededThe 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 HealthThe 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.

  1. Enable Display Errors in the Other tab at Configuration > System Settings > General Settings.
  2. Copy the Cron Command from Utilities > Automation Status.
  3. On the server, run php -i | grep display_errors to confirm errors will be shown.
  4. Run the command with all -F -vvv added to the end.
  5. 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. -F and do run 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 AfterCronJob runs each time the cron is called and DailyCronJob runs 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.

Share this article

Shahid Malla

Written by

Shahid Malla

Freelance WHMCS developer and web designer with 13+ years of client work. CTO at ElySpace, freelance developer for Marmaids LLC, and founder of WHMCSPilot and MagizAI.

Got a project like this?

Tell me what you need and I will send a written quote within one business day.