Handle schedules on firebase

0

I am doing a task for the university using the real-time database of Firebase in Ionic and Angular 2. I do not have any problem in the typical crud, but I need to make a change of a data from the database , and a certain time later (one hour, for example) to change the value again. Is there any way to update a data at a time programmed in firebase using (correct me if I'm wrong) your backend? This action should be typical of firebase. I commented that I do not have much knowledge of firebase in this aspect. I hope the problem is understood. Thank you very much in advance. [add this]: The doubt is also in which event to use to start this task, the idea of this is to modify a value of a node (onChange) and 20 minutes after returning it to its original state. Seeing that logic, to activate it with the change, I do not know how to change the data again. Could I use a setTimeout to execute the change 20 minutes later, but would it not affect performance? And more considering that I have the free firebase plan

    
asked by Víctor Hugo Tirado 28.09.2018 в 07:28
source

1 answer

-1

Maybe you are interested in finding out about cloud functions, this is programmed in javascript and runs on the server side, since we do not have to mount any server, we say it is serverless. Here I leave a video that I made of how to implement a firebase function that runs on the server side

link

In the same way that the video can be configured to work with timestamps and do things from different times (cron jobs). I leave you the repo of all public functions so far, following the video you can implement any. Also this video of how to use cron jobs with functions is very good link

link

    
answered by 28.09.2018 / 19:28
source