[Vuejs]-Javascript: How can I delete data automatically from firestore based on timestamp

0👍

There are couple of ways to do this.

First way to do is that you can use a Scheduled Cloud Function. You can find relevant example here and here

second way to use cron job. You can write a cron job which will call after every 15min let say and it will check that current time is less than your product’s timestamp. So when current time will be greater than your product’s timestamp so simply delete your product data from Firebase.

Leave a comment