Home > Net >  Firebase Cloud Function triggered by a Table datetime field
Firebase Cloud Function triggered by a Table datetime field

Time:04-06

I have a question regarding the triggering of Cloud Functions in Firebase.

I've seen the ones triggered by Creating, Delete or Update in Firestore, but what about if I have a Collection in Firestore in which documents have a Specific Date Time Field, and when that date comes the Function can auto-trigger.

Like if in the Collection Games, I have a Document in which the Date field is April 20, 2022, 18:30:00 UTC when that time comes a function will auto-trigger and run.

Is this possible to do, and if it is can someone show me a tutorial or something?

Kind Regards

CodePudding user response:

You have to setup a scheduler.

Eg. Every minute your function starts and queries Firestore for documents with your_date_field value in the past.

  • Related