I have an iOS/swift game with a leaderboard, and I'd like the scores to all reset to 0 every Monday at 12:00am.
I believe I'm all set up (enabled the Blaze plan, followed the steps in the Getting Started with Cloud Functions for Firebase and also the Cloud Scheduler Quickstart, etc), but I'm a bit unclear on how it all connects and both feel so distant from my database.
How can I get this Google Cloud Scheduler job to reset the scores for all users in my Firebase Realtime Database when it runs? I'm guessing I put some code in the Payload field?
Apologies if my question isn't precisely worded or is missing needed information. It feels like just a few months ago that I dipped my toes into programming and wrote print("Hello World") in Xcode and now here we are :D
Thanks in advance for any direction!
You should read the documentation for scheduled functions. If you're deploying with the Firebase CLI, everything will get set up for you automatically on the schedule you specify in the function. You don't even have to go to the Cloud console at all to configure Cloud Scheduler. Just write your function to do what you want, whenever it gets invoked by the scheduler.