Jump to content

DailyCronJob hook


LosBooom

Recommended Posts

Hello.

 

I think that in some updates DailyCronJob hook was broken.

I have some modules and scripts which use DailyCronJob hook and some of scripts stop working.

I added this code to my hooks

will post results tomorrow. 

Maybe there are more options how to find and fix the problem? Thank you.

Link to comment
Share on other sites

Make sure that there's no PHP error involved in custom scripts and that the user-agent that triggers cron.php is not using a different version of PHP. Years ago I lost a lot of time trying to figure out why DailyCronJob hook wasn't working as expected. Long story short:

  • My hooks.php file was encoded with ionCube for PHP 7.2
  • WHMCS was running with PHP 7.2
  • The user-agent triggering cron.php was running with PHP 5.6
  • Result? Daily Cron of WHMCS working as expected. DailyCronJob hook point was giving an error

It took me days to understand what was going on because the user-agent triggering cron.php was "higher" than local-user therefore I was looking in the wrong error_log 😢

Edited by Kian
Link to comment
Share on other sites

  • 2 weeks later...
6 hours ago, WHMCS ChrisD said:

@LosBooom just checking that this has fully resolved the issue for you now?

Yes, this completely solved our problem.
WHMCS Support was able to determine at what stage of the hooks there was a problem and we were able to find a module that behaved inappropriately and did break "Cron Job: Running Usage Stats Update for Server".

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.

  • 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