I'm using Firebase with my Xamarin.Forms project, I have a node called 'Requests' that has a field called 'autoCloseTime'. What I want to achieve is to set a scheduler for all 'Requests' children so that when the current time is equal to the 'autoCloseTime' field value I want to update another field. I want to use Cloud Functions, I have a workaround for this in the frontend but making such thing as a background service is always better. I checked the Firebase Function Scheduler but it doesn't serve my needs. How can I achieve that? Thank you.
Asked
Active
Viewed 15 times
0
-
You can schedule a function to run at a specific time with Cloud Tasks. The relevant part of the accepted answer in the duplicate starts with "If you want to schedule a single invocation of a Cloud Function on a delay from within the execution of another trigger, you can use Cloud Tasks to set that up. Read this article for an extended example of how that can work." There is currently no easier way to get this done within Google Cloud. – Doug Stevenson Oct 26 '20 at 21:21
-
I have read it already and it doesn't do what I want. So in the end I have to stick with frontend logic and forget about Cloud function for this requirement? – Sam Oct 26 '20 at 21:29
-
Actually it does do what you want. You just have to write a fair amount of code to assemble the solution. If you're not willing to do that, then you will need to invent your own alternative. – Doug Stevenson Oct 26 '20 at 21:31
-
Will do more research, thank you for your help! – Sam Oct 26 '20 at 21:39