question

Dev Lumo avatar image
Dev Lumo asked

Leaderboard reset at custom time

I know this have been asked before, but I'd like to know current status and hear possible best practices.

We'd like to have our daily leaderboards to reset other time than 00:00 UTC, so that reset would occur nighttime in USA.

Leaderboard settings doesn't allow this, daily reset always happens at midnight UTC. There is AdminAPI to manually reset leaderboard but apparently no way to run this automatically. There is scheduled tasks to run cloudscript functions at exactly wanted times, but cloudscript can run only ServerAPI, so that can't be used to reset leaderboards.

So is this correct, that there's no way to automatically reset daily leaderboards at wanted time? Except by setting up some system outside Playfab that calls AdminAPI once a day at wanted time.

If so, is there any suggestion where to set up script like this?

CloudScriptLeaderboards and Statisticstasks
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Marcus Nixon avatar image
Marcus Nixon answered

Hi Dev,

These forum post reference possible options for resetting your leaderboard.

https://community.playfab.com/questions/12507/using-scheduled-task-to-reset-leaderboard.html https://community.playfab.com/questions/28149/reset-top-10-players-leaderboard-only-and-maintain.html

You can use your favorite cloud provider to make the Admin api call. My experience is with Azure, so I would go with using Azure Functions. Not sure what the Amazon or Google equivalent for Azure Functions would be, but those should be sufficient as well.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.