0

I want to update field value(enable_options) in firebase realtime database when current time at firebase server is equals to field value(start_time).

enter image description here

Mayank Jain
  • 271
  • 3
  • 7
  • Sounds like a reasonable use-case. Which step along the way are you struggling with? – Frank van Puffelen Apr 20 '18 at 04:25
  • Where should i write this specific condition so that when this condition met i want to update enable_options field value from false to true. – Mayank Jain Apr 20 '18 at 04:34
  • You can either use Firebase Cloud Function or write your own node.js program in a server. Here are some links which will get you started.Cloud function(https://firebase.google.com/docs/functions/get-started) or Nodejs (https://firebase.google.com/docs/admin/setup) – Praveen Kumar A X Apr 20 '18 at 04:59
  • Simplest approach: Write a function in a setInterval and do a check every min, to see if your start_time and server time matches. – Praveen Kumar A X Apr 20 '18 at 05:02
  • Possible duplicate of [Cloud Functions timer](https://stackoverflow.com/questions/48843880/cloud-functions-timer) – Jay Apr 20 '18 at 15:42

0 Answers0