2

I have another problem with WHMCS 6.

WHMCS' cron.php does not run via CPanel's Cron Job!

I have correctly updated the config/configuration files for the crons for the WHMCS 6. Also - If I accessed the cron.php via the browser - the WHMCS cron is able to successfully execute. (I know, cron.php should not be placed in a "public" directory, but just doing this for testing).

However, cron.php does not run (or maybe was not able to completely run) when configured from CPanel's cron. Cron job command is this: php -q /home/mysitepath/public_html/crons/cron.php

I set an email address so an email will be sent when the cron runs - but strangely, I did NOT receive any emails. So I suspected that the cron did run - but just did not finish so email was not sent.

Note also that I created a TEST PHP script that will send a test email within the same directory as cron.php and the script ran successfully and email was sent.

Any ideas guys why?

Thanks again guys in advance!

1 Answers1

2

I ended up having this command that worked, though it means it needs the crons.php inside the public_html folder:

/usr/bin/curl http://whateverdomainyouhave.com/crons/cron.php
Mogsdad
  • 44,709
  • 21
  • 151
  • 275
  • Hello this worked for me, I was also having problem with whmcs crons, I installed ioncube on my server but still i was getting error as to run this cron you need to install ioncube..... Now i tried this and it's working fine for me.... great and thanks – dollar Jan 12 '16 at 14:55