I have this database which has a table for users
. which is updated every time a user is created in my fire-base.
table structure is like users -> {uid} -> (and some user parameters)
.
What i want to do is, for each user created i want to schedule
its disabling after specific time. i tried using node-schedule
but it is highly random, sometimes it works while sometimes not.
I have one cloud function which monitor an update on one field from sets of user field (user parameters). for example isRegistered
field which is 1
at the time of user creation. and once it become zero
function will release all the resource and also disable that specific user using its uid.
But i want one scheduler which will do this field updation for me after specific time lets say 5 hours meaning that user will have no longer access to my database after 5 hours. How can i approach this?