perlancar Posted January 13, 2019 Share Posted January 13, 2019 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/. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 13, 2019 Share Posted January 13, 2019 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... https://docs.whmcs.com/Invoicing_Setup#Continuous_Invoice_Generation 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. 1 Quote Link to comment Share on other sites More sharing options...
perlancar Posted January 13, 2019 Author Share Posted January 13, 2019 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 0 Quote Link to comment Share on other sites More sharing options...
perlancar Posted January 13, 2019 Author Share Posted January 13, 2019 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. 0 Quote Link to comment Share on other sites More sharing options...
perlancar Posted January 14, 2019 Author Share Posted January 14, 2019 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'. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 15, 2019 Share Posted January 15, 2019 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. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.