How to clear firebase tag automatically?

Hello, can someone clear me a question regarding firebase.
I would like to know if it is possible to reset the tag of all users automatically every day.

the tag returns to 0

Screenshot_31

logically possible, it would have to be executed on the client side, with a timer or on each input, comparing the date and resetting the data

1 Like

Yes, Every time user open the app check the saved date and time from tinydb with current date and time… Or use milli.

Choose the which method you want

If the difference in milli value is greater than 24hr or if the date difference is greater than 1 or…

Save the tag as zero

will only reset the score if the user enters the application?

I have an overall rank from the users score, I would use the same logic to get a daily rank.

the scores made for the day would be stored in the tag.
as soon as 00h hits all daily scores would be reset.

Yes no way in that… Else create an admin app and use the logic as you like and reset it by button click or compare the date

1 Like

Try with cron jobs

what would it be ?

I will follow your advice and create the admin app.

I can get the value of a desired tag from all users, but how to reset the tag of all users by pressing the button?

Screenshot_2
Screenshot_3

Clear tag mean, that tag will completely be removed… so try to save the score value as 0 or empty string

Before resetting the value,

image

After resetting

image

Here i have reset the score value to empty string

image

1 Like

it worked perfectly, thank you.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.