Recurring invoices not working

Hi. Ive set up 3 recurring invoices but non of them is getting created. Previously I had it set up with a cron job and it worked perfectly for 2 months. My cronjob supplier had issues and I had to recreate everything. My Cronjob runs once a day and it succeeds every time. But still the invoices are not created. My cronjob ran fine this morning but my recurring invoices all state that the next date is today.

Please help!

Thanks
Janno

Are there any outputs if you open the cron URL in your browser?

Hi Kovah

No just a blank screen.

Thanks
Janno

Hi

Did you do something as it just worked after I sent you the last message?

Regards
Janno

Could you please enable the debug mode in the general settings and try again. Forget to add this.

Hi Kovah

Thanks for your help, I did this and will see if it works next month.

Kind Regards
Janno

No you can try it again now. If the screen is blank there should be no general problems with the cron.
Please reset the date in the recurring invoices settings if something happens there.

Also: please never share any private URLs and never the cron URL. I deleted your post.

OK Thanks, It is blank, should I leave the debug setting on Yes?

No, if it’s blank with the debug mode you can disable it again.

Hi Kovah

Hope you’re well. You helped me in the past and was hoping you could help me again. After we last had contact the recurring invoices are working, or sort of. What happens now is that I have 3 recurring invoices, and when the cronjob runs it sends (emails) the first invoice, but the next 2 are marked as drafts and I have to click send email manually. Any idea why this is happening?

Thanks

I am having the same issue as Janno. Only the first of my emails is going out on the recurring invoices, the rest of them remain in draft. A default email template is set and all clients have email addresses in their client profiles.

I just ran a test again and one different recurring invoice was sent and the other clients recurring invoices remain in draft.

I checked /var/log/mail.log and in both instances only one email was sent. The server is running postfix for mail.

I did a 3rd test with debug mode on and same result, with a blank page when I opened the cron website in a browser.

Hi Cactus12

Kovah replied with this link ( https://development.invoiceplane.com/browse/IP-420 ). A ticket has been logged for this bug, but I checked now and there is no progress. I know his extremely busy and hopefully he’ll get to it soon.

Regards
Janno

Thanks Janno for the heads up!

OK so I have about 30 recurring invoices set up on the system, each for a different client, all set to recur on the first of the month.

I haven’t had a chance to try to fix this issue (https://development.invoiceplane.com/browse/IP-420) but these are my findings on the issues:

-When the cronjob runs, it finds a recurring invoice , emails it, and marks it as sent. It then goes to the next recurring invoice, and creates it, but does not email it out, and it remains in draft status.

-Recurring invoices that are created for clients without email addresses (e.g. ones that need to be mailed out) should not be marked as sent when they are generated. They are being done so currently (possibly because the assigned email template has a BCC address).

-Additionally, a 10 second delay between each generated invoice should be added to the process, so that email providers do not reject the outgoing emails for flooding.

I ran the cronjob each minute and after 15 minutes, there were 15 generated invoices in sent status, with emails sent (in cases where an email address existed for the client), and 15 generated invoices in draft status, not sent via email.

I believe a working solution would be:
Loop through all recurring invoices that are due. For each recurring invoice due:

  1. generate the invoice in draft status
  2. if the option for “Automatically Email recurring invoices” is set to “Yes” in the settings, a default email template is set, and the client profile’s email address is not null or blank: email the invoice and change the invoice to sent status
  3. delay 10 seconds

Has anyone found a fix for this issue yet? My current workaround is to log into the system on the 1st of each month and then send each manually.

Our work around has been to turn off all the recurring invoices and issue them all manually as well.

Just started using Invoiceplane and it works great so far. Now I read that Recurring Invoices are not working yet. For me it is not clear if recurring invoices are not working at all or if it is only the mailing of the invoices via a cron job / or a http link with the cron-key.
What does the cron-job do exactly? Is it only sending the e-mail out?
For the time being i could live with a system that would list the recurring invoices where i could manualy activate and send the invoice.

@Benny54 This is just a support thread that reports that the feature is not working for some users. Recurring invoices are working perfectly for me so just try it out with some test data.

Hi,

I did test recurring invoices with three weekly invoices that expired on the same date.

After the first cronjob run;
The first invoice was sent and the next date was set one week after the start date (this is okay).
The second invoice was not sent and the next date was the same as the start date. New invoice was in concept status.
The third invoice was not sent and the next date was set to one week after the start date.

I repeated the cronjob and then;
The second invoice still has concept status and was not sent but the next date was okay now
The third invoice was sent now.

I think this recurring invoices algorithm still needs some attention.

Regards, Benny.

1 Like

We (the Invoice Plane users) need to properly document how to replicate this problem, I’ll try and do that when I have some spare time.

One thing I saw when looking at InvoiceNinga (as a possible option) was this:

Did you click ‘Mark Sent’ for the test invoice, the script won’t send to draft invoices.

Is this also the case with Invoice Plane?