-
Notifications
You must be signed in to change notification settings - Fork 32
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
Issue: repetition does not happen directly for past bills #22
Comments
Thanks for the compliment! Bill repetition is done by a background job launched when Nextcloud cron script runs. It's set to run once a day to repeat what needs to be. What did you choose in Administration -> Basic settings -> Background jobs? If you are using AJAX or Webcron, it's possible the background jobs are delayed because those methods don't trigger anything if there is no user activity. It's recommended to choose "Cron" there and set a system cron job to execute the cron.php script every 15min or half hour. Did you expect the repetition to happen directly when you created a bill with a date in the past? It's not the case, repetitions are only done by the background job. |
This makes sense, thanks! I'm using cron, with the cron.php file set to run every 5 minutes. I can see from nextcloud.oc_jobs that OCA\Cospend\Cron\RepeatBills was last ran 18 hours ago, which is before I created my recurring bill. If I understood what you said, it should run in about 6 hours then and create all expenses linked to the repeated bills. It might be useful to add an option to force the cron job to run earlier in the case of creation of a past bill, and/or to warn users of the expected behavior. |
I'm interested to know if everything was actually correctly repeated after 24 hours.
It is actually not so simple to make it right. What if you made a mistake and a lot of bills are created? Then you have to delete them'all 😁. A solution could be to have a button to "repeat now" in the bill edition form..but then it's one more thing to explain in the interface. What do you think?
Right, I added a hint next to the "repeat" select explaining when/how repetition happens. |
Yes it did! All the payments now appear in the bill list and in the statistics.
You could add a button to duplicate existing bills (and then just edit the date). And keep the repeat option for creating bills with dates in the future. I'm not sure if this is what you had in mind with the "repeat now" button but that would do the trick for me. |
Well it's kind of redundant with the repeat feature.
It would be a button to immediately trigger the repetition process on one specific bill. This way, if you create a 10 days old bill, set it to daily repetition, you could just click the "repeat now" button to immediately create 9 repetitions of this bill until today. This would avoid waiting for the repetition job if you're in a hurry to see those bills created 😁. |
Signed-off-by: Julien Veyssier <[email protected]>
v1.2.4 is out with the 'repeat now' button. I'm interested in your feedback if you have a chance to try this. |
Hi, I just tested it. It seems to work perfectly. Thank you! |
Thank for this app. It's very useful.
I have an issue with the repeat feature. Repeated bills only appear once, they are not repeated. Tested with weekly and monthly repetition. No error in Nextcloud log
Nextcloud server 20.0.2 (on Debian)
Cospend 1.2.2
PHP7.4
browser firefox 83.0
The text was updated successfully, but these errors were encountered: