Advanced Cron Troubleshooting for Intermittent Issues: Expert Solutions

thumb_up 1  ·  sell Intermittent cron issue troubleshooting, Resolving advanced cron problems, Expert solutions for intermittent cron issues

Symptom

You may find that the cron job is not completing intermittently but does complete all of its tasks when you run it via the command line using these steps.

Cause

This type of issue may have many causes. You must perform additional investigation before you can determine next steps.

Investigation

In order to investigate this issue, we recommend logging the output of the cron.php script to a file and then examining its contents.

If you use cPanel & WHM, this includes steps within WHMCS and in cPanel.

For more information for other control panels, see your server's documentation.

To investigate this issue on a cPanel & WHM server:

1. In the WHMCS Admin Area, go to the Other tab at Configuration > System Settings > General Settings or, prior to WHMCS 8.0, Setup > General Settings.

2. Select Display Errors.

Tick the Display Errors checkbox

3. Click Save Changes.

4. In cPanel, go to Advanced >> Cron Jobs.

cPanel Cron Jobs icon

5. Click Edit for the cron job command that references the cron.php file:

Edit Cron Job

6. For Command, append the following code to the end of the line:

 -vvv >> crondebug.txt
 
Editing the Cron Command

7. Click Edit Line.

8. Wait until the Time of Day window has passed. For example, if the Time of Day setting is 1pm, wait until 2pm.

9. Open the crondebug.txt file in your account's root directory. This file contains entries from each invocation of the cron.php script.

cPanel File Manager v3

10. Review the file contents to locate the daily automation tasks. To find this, look for 24 or more tasks that queued for execution.

These will resemble the following examples:

  • An error 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
 

11. Use the explanations of common errors in our documentation to continue resolving the issue.

WHMCS Technical Support can help you with these errors. When you open your support ticket, make sure to include the full output in your crondebug.txt file.

 
 
The End! should you have any inquiries, we encourage you to reach out to the Vercaa Support Center without hesitation.

Was this answer helpful?

Related Articles

description

Step-by-Step Guide to Installing WHMCS

To start using WHMCS, you will need to install it on your server. You may need help from your hosting provider or system administrator…

arrow_forward
description

Configuring cPanel Site Software for WHMCS Integration: A How-To Guide

You can install WHMCS using cPanel's Site Software feature. Before you can perform the installation, a WHM user must enable WHMCS…

arrow_forward
description

Effortless WHMCS Installation Using cPanel Site Software: A Step-by-Step Tutorial

You can install WHMCS easily using cPanel's Site Software feature. To do this: 1. If you have not already done so, configure…

arrow_forward
description

Configuring WHMCS Cron Jobs: Step-by-Step Setup Guide

You will need to configure the cron job as soon as you finish installing WHMCS. The cron job executes WHMCS's automation tasks,…

arrow_forward
description

Customizing the WHMCS Cron Schedule: Configuration Guide

The WHMCS cron job performs many of the automated tasks for your WHMCS installation. You can customize when and how often it runs…

arrow_forward
arrow_back « Back