The way WHMCS manages the crons is poor: mainly, just two main hook points (AfterCronJob and DailyCronJob) that allow a script to run or every 5 minutes (or any other lapse of time set by the owner of WHMCS) or during main daily cron job (at the time that is set by the owner of WHMCS)
But, what if I need to run a script in at a certain time?
The only way, currently, is setting in the system a dedicated cron, to run my own script... but this is complicated to set, and even more complicated to monitor.
So, it would be useful a hook that, using AfterCronJob (and so, running every 5 minutes or so) do the following:
am I near to the time that this script has to be run?
am I sure the script has not already run for this session ? (check just to be sure that the script does not run twice al the same session)
The way WHMCS manages the crons is poor: mainly, just two main hook points (AfterCronJob and DailyCronJob) that allow a script to run or every 5 minutes (or any other lapse of time set by the owner of WHMCS) or during main daily cron job (at the time that is set by the owner of WHMCS)
But, what if I need to run a script in at a certain time?
The only way, currently, is setting in the system a dedicated cron, to run my own script... but this is complicated to set, and even more complicated to monitor.
So, it would be useful a hook that, using AfterCronJob (and so, running every 5 minutes or so) do the following: