Delete Real-time Database after 24 hour

1,912 views
Skip to first unread message

Mayank Pandey

unread,
Jul 27, 2020, 7:16:55 AM7/27/20
to Firebase Google Group
Hello, I want to delete all the data user inserted ,it only remains 24 hour after that data will be deleted automatically.

Arthur Thompson

unread,
Jul 27, 2020, 10:59:19 AM7/27/20
to fireba...@googlegroups.com
Hi Mayank,

There are a few ways this can be done.

One way would be to record the time at which the user data is written. Then setup a scheduled function that runs say once every 12 hours that checks the timestamp of the data and deletes it if the data is more than 24 hours old.

On Mon, Jul 27, 2020 at 4:16 AM Mayank Pandey <mayupan...@gmail.com> wrote:
Hello, I want to delete all the data user inserted ,it only remains 24 hour after that data will be deleted automatically.

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/56712dc0-1fb7-40e7-a09d-b6b8a9981151o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages