I’ve searched and searched. Just wondering what is the best way to do the following:
I am recording audio in my app and I want to limit the amount of audio each user records a month.
- I have a number field in the data base to store the length of each audio clip.
- I add all lengths via Search for User’s Audio: each item’s audio length:sum, to get a total.
- When total sum is greater than X the record audio button is disabled.
What is the best way to reset each user back to 0 on the first of each month? I’ve seen so many different methods including Cron-job.org
Is there a steadfast rule on this?
Really appreciate everyone’s help! Thank you
When you do the search could you filter it on
created date > current date time rounded down to month? Would that work for what you need?
That seems like it will work. Don’t see why it wouldn’t.
Going to check now. Thanks so much!
Sounds good. Let us know how it goes.
So your method works perfectly. Just realized, I have paying users and need it to reset monthly on the day they sign up.
I could do two things here.
- pro-rate billing based on sign up (seems too complicated with stripe)
- Adjust the monthly reset to the day (also seems confusing because months end on 28, 29, 30 and 31.
Thanks again for your help!
If you need to reset something on the first of every month. You can run a backend workflow on the first of every month and loop it to run through each user. Then at the end of the loop you would schedule it to run next month on the first.
Or… if it is based on the user. Not sure if it’s really the best option… But you can also schedule a backend workflow to run after a month of when they sign up and loop it forever each month from then on. It should be pretty good since people will be signing up at different times and days. So it shouldn’t get too overloaded with it trying to do a bunch at one time. Unless someone has a better option/opinion about it.
Hope that helps.
You are the best. Thank you so much!!!