Hi,
I'd like to reset leaderboards daily, but not at 00:00 UTC. Instead, I'd like to set it using my own time zone.
What I think I should do is schedule a task, and in cloud code (using handler), somehow access the admin API to call IncrementPlayerStatisticVersion.
Can it be done this way? If yes, how do I access the admin API in Cloud Code? Just like server.DoSomething(), is it admin.IncrementPlayerStatisticVersion(...) ?
I also read a post recommendation where I'm to use an Admin tool to accomplish something like this, and if I'm not mistaken, that means client side on say Unity Editor Extensions right? I'd like this to be automated and purely server side.
Thanks yo!
-Dave
Answer by Brendan · Jun 20, 2017 at 03:18 AM
No, Cloud Script has access to the Server API, but not Admin. To reset a statistic on a different time, you would need to write a script which you run locally at the correct time. We'll be providing more options for ways to control the time of a statistic reset in a future update.
Im guessing playfabs back end is a load of cron tasks to reset the board every hour, day, week or month. It would be good if we can override it with our own cron expression.
Actually, no, that's not how it's set up. But as I said, yes, we will be offering more options for leaderboard resets in a future update. Sorry we can't provide a specific timeframe for this yet - as a live service, we have to ensure that the stability and reliability of the service is our highest priority, so our schedule can (and does) change frequently.
Leaderboard related Questions 1 Answer
Azure Functions - context return null, Scheduled Tasks faild [two questions] 3 Answers
Update Statistic: invocation of cloud script function failed 1 Answer
Azure Function PLAYFAB_DEV_SECRET_KEY simple question 1 Answer
Title exceeded limit when I want to grant leaderboard rewards 1 Answer