Intermittent Cron Failures
On this page
Problem
The cron successfully finishes all of its tasks when you run it manually, but some cron job runs still do not succeed.
Cause
This type of issue may have many causes. You must perform additional investigation before you can determine next steps.
Troubleshooting
To troubleshoot this, log the output of the cron.php
script to a file and then examine its contents.
To investigate this issue on a cPanel & WHM server:
Enable Display Errors in the Other tab at Configuration () > System Settings > General Settings.
For more information, see Enable Error Reporting.In cPanel, go to Advanced » Cron Jobs.
Click Edit for the cron job command that references the
cron.php
file.For Command, append the following code to the end of the line:
-vvv >> crondebug.txt
Click Edit Line.
Wait until the Time of Day window has passed. For example, if the Time of Day setting is 1pm, wait until 2pm.
Open the
crondebug.txt
file in your account’sroot
directory. This file contains entries from each invocation of thecron.php
script.Review the file contents to locate the daily automation tasks. To find this, look for 24 or more tasks that queued for execution. For example:
An error occurring during execution:
WHMCS Automation Task Utility: all ================================== Queuing Tasks ------------- Applying "in progress" and "is due" state filters Task queues ready Executing Application Queue --------------------------- Currency Exchange Rates Product Pricing Updates Tenant Usage Metrics [ERROR] WHMCS\Exception\Module\NotServicable: Connection Error: Could not resolve host: fakeservertest(6) in /home/v80whmcssupport/public_html/whmcs/modules/servers/cpanel/cpanel.php:0
A successful execution:
WHMCS Automation Task Utility: all ================================== Daily Cron Automation Mode Queuing Tasks ------------- Applying "in progress" and "is due" state filters Task queues ready Executing Application Queue --------------------------- Currency Exchange Rates Product Pricing Updates Invoices Late Fees Credit Card Charges Invoice & Overdue Reminders Domain Renewal Notices Cancellation Requests Overdue Suspensions Overdue Terminations Fixed Term Terminations Inactive Tickets Delayed Affiliate Commissions Email Marketer Rules SSL Sync Server Usage Stats Client Status Update Domain Expiry Ticket Escalation Rules Data Retention Pruning WHMCS Updates Run Jobs Queue Sending Daily Cron Digest email Executing System Queue ---------------------- [OK] Completed
Use the error that you find to determine the issue’s cause.
- For more information, search for the specific error in our Troubleshooting documentation.
- For additional help, contact WHMCS Technical Support. Include the full output from the steps above when you open your ticket.
Last modified: October 30, 2024