0

I have two integer values called Score and Highscore. I am using firebase to store values, users and such. I was wondering, if it was possible to reset a users Score every month? Like when we reach the 1st of the month, every users Score is set to 0?

Is that even possible? I sure hope so!

PS. Sorry for not showing any code, but I believe it is irrelevent at this point - let me know if you think otherwise :-)

D. Finna
  • 467
  • 2
  • 7
  • 19

1 Answers1

0

You should better add an App Engine backend which has a simple servlet and a cron task. This backend is going to update your Firebase database monthly.

Backend:

  • Servlet; updates all scores to 0 except the top score.
  • Cron task; calls the servlet monthly.

See this link; Adding backend logic using App Engine:

Devrim
  • 15,345
  • 4
  • 66
  • 74