I'm working on a web app with firebase as backend and reactjs, and i want to create an self destructing value or at least an boolean value that changes after 24h. Is there a way to do it with firebase or with another database?
Asked
Active
Viewed 178 times
0
-
You would probably need a server to run a cron job or something similar that's scheduled to sweep your database for expired values at a specified interval. Databases are just stores, they don't have documents that can schedule changes to themselves, there needs to be an actor on the database. – Patrick Roberts Jul 05 '19 at 18:36
-
You can check my answer here https://stackoverflow.com/questions/35737708/how-to-run-cron-job-with-firebase/56063698#56063698 – Gastón Saillén Jul 05 '19 at 18:40