Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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

Kind Regards

>Solution :

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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading