I am programming an App that sends a timestamp to the server, and at this timestamp, a function needs to be executed. Is this even possible with the serverless design? And if not, how would you go about this problem?
CodePudding user response:
The solution you are looking for is at https://firebase.google.com/docs/functions/schedule-functions
CodePudding user response:
I believe that the timestamp you are sending from App Engine is a future timestamp and yes, there is a way in which you can trigger a Cloud Function by using the timestamp from App Engine.
To do that one needs to use Cloud Tasks within a Google App Engine application to trigger a Cloud Function. This document explains how to trigger a Cloud Function, to send a scheduled mail in future, by using Cloud Tasks from within the App Engine, which you can refer to know more about how you can accomplish this to trigger Cloud Function in your use case.
Also this article explains how to Schedule Cloud Function for future using Cloud Tasks to build a Firestore document, which may help you.