Recurring transactions implementation improvement? #5702
Replies: 3 comments
-
You can run the cron job as often as you like. It will not create extra transactions.
This is already in place. |
Beta Was this translation helpful? Give feedback.
-
@JC5
If you instead will just check if the transaction was created in the day it needs to be created, and create it if not, this is simple solution and doesn't require any other things to happen to work. At least it seems to me so. |
Beta Was this translation helpful? Give feedback.
-
My server was down for a week. All recurring transactions that were supposed to fire during this week didn't. I agree to @stepanov1975 that either the script should process all due recurring transactions instead of the ones due today, or there should at least be a way to manually trigger the skipped ones (currently in the UI there's a possibility to manually fire future transactions, but not the past ones). |
Beta Was this translation helpful? Give feedback.
-
Hi.
From what I can see recurring transactions implemented in the following way
I would propose a different approach. Add to the database for recurring transactions column with the date when the transaction was executed last time. This information is useful anyway. Then each time cron called just check if the transaction was executed at the proper date. If not fire it. This seems to be a more robust approach. Both allow missing cron calls without missing transitions and protect against multiple cron calls on the same day.
Beta Was this translation helpful? Give feedback.
All reactions