Rene Alas
Rene Alas

Reputation: 541

Firebase Cloud Function triggered by a Table datetime field

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

Upvotes: 2

Views: 278

Answers (1)

Francesco Colamonici
Francesco Colamonici

Reputation: 1297

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.

Upvotes: 1

Related Questions