3

I created an addon for whmcs in whmcs/modules/addons directory which I want to run it by the system's cron job. WHMCS's cron job uses this:

php -q /var/www/html/whmcs/whmcs/admin/cron.php

to automate module functions (suspension, termination) and billing settings.

Any ideas to add function to automate my addon using the same cron job while cron.php is encrypted?

Unheilig
  • 16,196
  • 193
  • 68
  • 98
Lamya Elmorsy
  • 341
  • 4
  • 13

2 Answers2

2

Just in case you are still looking at this in 2018, docs have changed, you can find DailyCronJob docs here: https://developers.whmcs.com/hooks-reference/cron/#dailycronjob

Also here you can find an entry point for modules creation in WHMCS: https://developers.whmcs.com/modules/

MasterKitano
  • 608
  • 5
  • 10
1

Use the DailyCronJob hook, add it to the hooks.php in your module.

wesamly
  • 1,484
  • 1
  • 16
  • 23
  • 1
    This answer does not help at all.. The link literally gives no information on where to start or how to proceed. – Marcel Nov 20 '15 at 21:50
  • hello @Marcel for someone who created an addon that should be enough answer. Unless you're the one who asked the question I see no reason for you to down vote my answer. please reconsider. Better than down voting, can you please contribute with the "Helpful answer"!!! – wesamly Nov 21 '15 at 09:51
  • StackOverflow admins, can you please reconsider the down vote of @Marcel. I find it not helping in any way. Thank you. – wesamly Nov 21 '15 at 09:53
  • Your answer is too short - one line at the time of writing; try expanding it a little, and explaining how hooks.php works. Does hooks.php in a module get called even if the module isn't loaded? eg payment gateway. – Brian C Jan 25 '23 at 05:08