Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by games · Jun 20, 2017 at 03:11 AM · CloudScriptapisLeaderboards and Statisticsscheduled taskstasks

Can Cloud Code Access the Admin API

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

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

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.

Comment

People who like this

0 Show 2 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image colinchiu · Jul 27, 2017 at 07:38 PM 0
Share

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.

avatar image Brendan ♦♦ colinchiu · Jul 27, 2017 at 07:40 PM 0
Share

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.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    3 People are following this question.

    avatar image avatar image avatar image

    Related Questions

    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

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges