Jump to content

"Cron PHP Version Mismatch" & "The system cron does not appear to have completed successfully within the last 24 hours"


Recommended Posts

Hi,

I had an issue with my Cron not running. I thought I'd post the fix here to help others.

I had these errors: "The system Cron does not appear to have completed successfully within the last 24 hours"

"Cron PHP Version Mismatch "

My automation tasks were not running and I was not receiving a cron email.

Firstly, I changed the permissions of cron.php to 755 - "/home/site-path/public_html/our-install/crons /cron .php"

Secondly, to fix the Cron PHP Version Mismatch error I added the path to the version of PHP I was using to the cron task:

/opt/cpanel/ea-php73/root/usr/bin/php -q /home/PATH/TO/crons/cron.php 

Replace "ea-php73" with the version of PHP your site is using.

You can find the exact cron task to use with the path to your version of PHP in WHMCS settings in this menu:  Setup - Automation Settings

image.thumb.png.dc569ce198dd8687c313aa5d6b490eb8.png

Finally, I checked for any php.ini (or other ini files e.g. user.ini) and changed the version of PHP written there to "ea-php73"

e.g.

session.save_path = "/var/cpanel/php/sessions/ea-php73"

My Cron job now runs correctly, the automation features of WHMCS run correctly and I have no warnings or errors in System Health.

I hope this helps others as I had to spend a lot of time troubleshooting this since I had to wait until 9am each morning for the Cron to run  to debug. Many of the topics on the community do not specify that you have to add the path to php to the cron, which confused me.

Thanks to my web hosts and WHMCS support for their help.

Jack

Edited by jackshreeve
Added info about where to find the correct cron command in WHMCS settings
Link to comment
Share on other sites

  • 1 month later...
  • 5 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated