Jump to content

renewal invoice generation stopped since Jan 3rd, no clue from logs/status page

Recommended Posts

Renewal invoice generation on our WHMCS installation has stopped since Jan 3rd. Since then until today, there are 0 invoices generated every day. Cron jobs have been set to run every 5 minutes as instructed. The automation status page says Automation Status is OK (green), next daily task run is 23 hours (meaning the daily task has been run recently). How do I debug this? The activity log doesn't show anything that indicates problem. There are no suspicious hooks in includes/hooks/.

Share this post

Link to post
Share on other sites
1 hour ago, perlancar said:

How do I debug this?

obvious thought would be whether you know if any invoices are actually due to be generated for this period?

there's an old v6 admin widget that tells you about forthcoming invoices to be generated - once v7.7 comes out of beta, i'll rewrite it but it should still work in any of the latest versions...

you could even run the domains and/or services reports, give it a filter of a specific month to check and see if that tells you whether any are due for renewal this month - you may need it change the month depending on the value of your invoice generation value from automation settings.


another possible cause might be that "Continuous Invoice Generation" is disabled and previous invoices haven't been paid...


there are other possibilities, but usually the activity log is the best clue - though if you say that's not giving you any indication of where to look, then a ticket to Support might be a quicker solution as seeing those logs, and/or your setup in general, might resolves this faster than a series of suggestions from the outside.

  • Thanks 1

Share this post

Link to post
Share on other sites

Hi brian!,

Thanks for commenting. Yes, there are renewal invoices that are supposed to be generated. I've also submitted a ticket to WHMCS Support.

After Jan 3rd, all I'm seeing is in activity log related to renewal invoice generation is:

| xxxx1 | 2019-01-13 17:00:09 | Automated Task: Starting Invoices
| xxxx2 | 2019-01-13 17:00:30 | Automated Task: Starting Late Fees

While in the previous day, it's something like:

| xxxx1 | 2019-01-01 12:00:12 | Automated Task: Starting Invoices             
| xxxx2 | 2019-01-01 12:01:33 | Created Invoice - Invoice ID: xxxxxxx1    
| xxxx3 | 2019-01-01 12:01:33 | Email Sent to xxxxxxxxxxxxxx (New Invoice #xxxxxxx1)  - User ID: xxxxxxx
| xxxx4 | 2019-01-01 12:01:33 | Created Invoice - Invoice ID: xxxxxxx2                          
| xxxx5 | 2019-01-01 12:01:34 | Email Sent to xxxxxxxxxxxxxxx (New Invoice #xxxxxxx2)  - User ID: xxxxxxx
... (lots of other invoices being generated)
| xxx99 | 2019-01-01 12:04:37 | Automated Task: Starting Late Fees             


Share this post

Link to post
Share on other sites

Using the SQL query you wrote in

SELECT * FROM `tblhosting` WHERE DATEDIFF(`nextduedate`, Now()) <= 30 AND `server` > 0 ORDER BY `nextduedate` ASC;

also resulted in many rows (too many, in fact) being returned.

Share this post

Link to post
Share on other sites

OK I've found the culprit. One of the client has their language field in the database set to something like '2013-01-02 11:22:33' instead of 'English' or some other language. Don't know how or why this happened, but this caused the cronjob to throw a PHP exception (the Symfony Translator component when validating a valid locale name). This exception can only be seen if we run cron.php using arguments 'all -F -vvv'.

Share this post

Link to post
Share on other sites
On 14/01/2019 at 13:21, perlancar said:

OK I've found the culprit.

never heard  that happen before... but if it's a one-off, then I suppose that there's nothing to worry about.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.


Important Information

By using this site, you agree to our Terms of Use & Guidelines