Jump to content

Cron Status Error


Recommended Posts

we am working for whmcs and trying to fix cron status. server is in house hosted.

Current version: 7.7.0

we checked the Automation Settings and found " Cron Status Error " and last run long ago. but if we run the below (displaying crontab command)is on manually from terminal we found everything working ok.

 /opt/cpanel/ea-php72/root/usr/bin/php -q /home/leotechltd/public_html/crons/cron.php

checked the crontab on cpanel  and configuration was as expected given below.

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

if anyone know how to resolve the issue please share your knowledge.

 

 

 

 

Link to comment
Share on other sites

If the cron you run from the terminal command line works fine, you should use the exact command for your cPanel crontab configuration.

Forget what cPanel is suggesting you to use, its not correct for your PHP version. Running just php -q uses the PHP installed on the server.

Your PHP is on /opt/cpanel/ea-php72/root/usr/bin

That means your cronjobs on cPanel should look like that.

Link to comment
Share on other sites

  • WHMCS Technical Analyst


The best way to see what is happening with your cron, would be to append it with -vvv > /home/leotechltd/public_html/crons/cronlog.txt so it looks something like:

/opt/cpanel/ea-php72/root/usr/bin/php -q /home/leotechltd/public_html/crons/cron.php -vvv > /home/leotechltd/public_html/crons/cronlog.txt

Enable displaying of PHP errors in WHMCS, via Setup > General Settings > Other and check the display errors option.
Then when cron runs, the output of your /home/leotechltd/public_html/crons/cronlog.txt file would contain a more detailed error message allowing you to pin-point exactly what the issue is.

There is further information along with step-by-step instructions in our online documentation at https://help.whmcs.com/m/automation/l/683269-advanced-cron-troubleshooting

Let me know how it goes
 

Link to comment
Share on other sites

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.

×
×
  • 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