Cloud function running every minute - good idea?

Actions & Logic

Hello FF community 🙂

In my app users can set a date/time to an item to receive a notification when the time == current time.
To make sure that the notification is sent I do have a cloud function that runs every minute and checks all items in the collection if the notification date/time == current time.

I looked a bit into the future and was wondering what if there are suddenly 1 million + items in that collection that would be alot of data combined with costs.

What would be a better approach to query the items where notification date/time == current time and send the notification to the specific users?

I'm mainly looking for a solution to prevent high costs due to alot of reads and invocations.


Thank you for your ideas.


Best,

Mick

What have you tried so far?

Thought about the scheduled notification time feature in FF but there is not enough documentation on how exactly it works (if a parameter is changed for an item so a notification is not relevant anymore) or if a task gets deleted, etc.

Did you check FlutterFlow's Documentation for this topic?
Yes
1
3 replies