WHMCS Cron Job Not Running? Fix It with This Step-by-Step Guide

Is your WHMCS cron job not running? Follow this guide to fix automation issues and ensure your WHMCS tasks run smoothly every day.

WHMCS relies on a daily cron job to automate essential tasks like sending invoices, generating reports, suspending overdue accounts, and more. If the cron job stops working, your billing system can quickly fall behind.

In this guide, we’ll walk you through the most common reasons the WHMCS cron job fails and how to fix it.

What Is the WHMCS Cron Job?

The cron job is a scheduled task that runs once daily to handle:

  • Invoice generation
  • Suspension and termination of services
  • Automated emails (reminders, overdue notices)
  • Domain renewals
  • Ticket escalations
  • Report generation

Without it, your WHMCS system becomes partially manual — which defeats its core purpose.

Step-by-Step: How to Fix the WHMCS Cron Job

1. Verify Your Cron Command

Check the WHMCS-recommended cron command:

php -q /home/username/public_html/crons/cron.php

Make sure:

  • The path is correct based on your file structure
  • You’re using the proper PHP version

If your server runs multiple PHP versions, you may need something like:

/usr/local/bin/php81 -q /home/username/public_html/crons/cron.php

You can find the correct command inside:
WHMCS Admin > Setup > Automation Settings > Cron Commands

2. Set Up the Cron in cPanel or Your Panel

If you’re using cPanel:

  • Go to Advanced > Cron Jobs
  • Add a new job (typically set to run once daily at 9 AM):

0 9 * * * php -q /home/username/public_html/crons/cron.php

Set the correct time zone in your WHMCS settings so automation runs at your local time.

3. Check Cron Activity in WHMCS

Go to:
WHMCS Admin > Automation Settings

You’ll see the Last Cron Run Time. If the time is blank or outdated, your cron isn’t executing.

You can also check:
Utilities > System Logs > Activity Log
Look for lines like:
Cron Job: Starting
Cron Job: Completed

If there’s no recent activity, the cron isn’t running.

4. Manually Run the Cron and Check for Errors

SSH into your server and manually run:

php -q /home/username/public_html/crons/cron.php

Check the output for any errors such as:

  • Permission denied
  • File not found
  • PHP version errors
  • License check failed

5. Ensure the PHP Path Is Correct

Run this command to check your PHP path:

which php

It might return something like /usr/bin/php or /usr/local/bin/php81. Use this in your cron command.

If you’re using custom PHP (e.g., CloudLinux or multiple PHP versions), be sure to call the right one.

6. Fix File Permissions

Ensure the cron.php file is readable and executable:

chmod 755 /home/username/public_html/crons/cron.php

7. Email Output Logs (Optional)

You can modify the cron command to email you errors:

php -q /home/username/public_html/crons/cron.php > /home/username/cronlog.txt 2>&1

Or set a cron job email in cPanel to get error reports.

Conclusion

If your WHMCS cron job isn’t running, start by verifying the command, checking logs, and testing execution manually. Most issues come down to incorrect paths, PHP version mismatches, or permission errors.

Once fixed, your system will resume full automation — saving you time and ensuring your hosting business runs smoothly.

Need help setting up or debugging WHMCS automation? We offer professional WHMCS setup and support services. Contact us today to get started.