Whmcs Cron Invocation Frequency Warning
Resolving a Cron Invocation Frequency Warning
Advanced Cron Troubleshooting



To automate tasks, WHMCS requires the regular and frequent invocation of a file via cron.
A warning will be displayed in the Cron Status modal of the Automation Status page if WHMCS detects that the cron.php file has not run within the past 2 hours.
To resolve this, you must ensure that the cron job on your server is scheduled to run the cron.php file at least once per hour. The recommended frequency is every 5 minutes.


Time Zone Mismatch

You may see errors if your server's time zone does not match the time zone in WHMCS. On shared hosting servers, UTC is often set within the PHP configuration, which is separate from the PHP configuration you use on the command line. To resolve these errors, you must ensure that WHMCS's PHP configuration and the server's use the same time zone.
To check the server's PHP's time zone, run php -ini | grep "date.timezone". Then, compare this against the time zone in Utilities > System > PHP Info.
If these time zones differ, work with your hosting provider or system administrator to update these values.

How to Correctly Schedule the Cron Job

These steps demonstrate how to correctly schedule a cron job using the cPanel.
If you use another server type, review our Cron Documentation for guidance.

1. Log in to the cPanel account that hosts your WHMCS installation
2. Click on Cron Jobs.



3. Edit the cron job command which references the cron.php file:

Zoom: Edit Cron Job
4. In the -- Common Settings -- dropdown menu, select the Every 5 Minutes option:



5. Finally, click Edit Line


The cron job is now scheduled to invoke the cron.php file at the recommended frequency for WHMCS to perform optimally.
This warning will be resolved within the next 10 minutes when the cron.php script is invoked with the new frequency.

------------------------------------------------
Advanced Cron Troubleshooting
------------------------------------------------
If you have determined that the cron job is not completing in the previous article and are familiar with using the server's Command Line Interface (SSH), this guide shows how to identify the cause.
The cron.php script contains a number of options which can be called most easily via the server's command line, one of which increases the verbosity of the output. This can be helpful in identifying any errors which might be occurring.
First, access your WHMCS Admin area. Then, go to Configuration > System Settings > General Settings > Other, or Setup > General Settings > Other for WHMCS 7.10 and earlier.


Check Display Errors and then click Save Changes.






Next, navigate to Configuration > System Settings > Automation Settings (Setup > Automation Settings for WHMCS 7.10 and earlier).

Copy the Cron Command starting at php:






Access your server's Command Line Interface:






Paste the Cron Command into the Command Line Interface. At the end of the command, add the following command and options:

:
all -F -vvv
The all command will execute all the tasks.
The -F option forces all the tasks to be executed, even if some of the daily tasks have already been performed today
The -vvv option sets the output verbosity level to maximum, meaning everything which can be output will be output.
You should now be ready to execute a command similar to:

:
php -q /home/v71whmcssupport/public_html/whmcs/crons/cron.php all -F -vvv



Press Enter to execute the command.
On screen you will see the cron.php script progress through all 24 tasks and return a green [OK] Completed message at the end.






The above screenshot shows a successful execution.
Any errors which might be output on-screen can be used to identify the cause of the cron not completing.





------------------------------------------------

whmcs
crons config.php

file manager
username web root save



:
https://help.whmcs.com/m/automation/...quency-warning
https://help.whmcs.com/m/automation/...roubleshooting