-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recurring Invoice Creation Issue #1757
Comments
Is the cron set to run hourly? |
No, it’s set to run once daily as it should be. The example you linked for instance is set to run once daily as well. If however your cron run time and time zone are offset like mine were then the recurring stuff will never fire no matter how many days it runs. I know a lot of people that run crons late at night and can see this being a pretty big issue. If it is premature due to timezone it should process the next day it runs. |
I'll update the docs, "ninja:send-invoices" should be set to run hourly. |
I guess maybe I am missing something. Running the cron hourly seems like overkill. It makes it so the output from the cron isn’t helpful as you would be inundated with cron reports if anyone actually reads them. There also isn’t really a need to run it hourly as this timezone thing is the only logic that would change between runs. Why not just fix the logic and leave it running once? |
We'll look into fixing this in the future, until then running it hourly should work. |
Ah, I understand now. Thanks! |
The condition linked below causes issues. If the timezone is offset the recurring expense or invoice NEVER gets created as there is a hard return. It should be more clever and wait for the next day maybe just looking at interval + 1 day if the timezone is offset? I had an issue where only the first invoice/expense would create and then never again and I am 99% sure this bugger was the problem.
invoiceninja/app/Models/Traits/HasRecurrence.php
Line 43 in 84c4262
The text was updated successfully, but these errors were encountered: