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 /
  • Bugs /
avatar image
Question by bxaxvx · Dec 13, 2017 at 06:48 PM · Player Datascheduled tasks

Problem with daily challenge reset

Hello.

I have daily challenge feature in my game. It works pretty simple every player has Player Data field "playedDailyChallenge". And I have 2 scheduled tasks which run daily. "Randomize daily challenge seed" for random map seed generation and "Reset daily challenge" which sets Player Data field "playedDailyChallenge" to FALSE for each player in "All players" segment.

And it worked fine at least for month. But recently I start getting complains from players that daily challenge is not working. I checked and for some players "playedDailyChallenge" is TRUE despite the fact that they didn't play today. So I started investigating the problem and found that "Reset daily challenge" task failed 2 times in recent days with error message:

Maximum number of concurrent bulk segment jobs are already running

But still it's not giving me the answer why "playedDailyChallenge" wasn't reset for some players because "Reset daily challenge" runned succesfully yesterday. I checked Task details again and found that SegmentId is marked as Deleted:

{
    "SegmentId": "E35F39E572188E7A [Deleted]",
    "ActionId": "7DCCC243EC9ED7CC"
}

For now I made a new player segment called "Everyone" as a replacement for "All players", maybe it will help me to solve this problem. But clearly, there is something wrong with it.

reset-daily-challenge-fail.png (139.4 kB)
reset-daily-challenge-fail-details.png (71.6 kB)
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

2 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · Dec 14, 2017 at 02:20 AM

Please turn on the publish PlayStream event option on the scheduled task: https://developer.playfab.com/en-us/F82B/servers/scheduled-tasks/999932250DFACD0D/edit. That then would give you the ability to review any failures, to look for issues. It's a relatively simple operation, but there's still some opportunity for failure, whether due to a server falling over in AWS or a concurrent edit error. The latter shouldn't be the case, since the player wasn't signed in, but we'd need more data to know for sure.

However, all that aside, there's a far more reliable and simple way to enable this feature. Trying to set a value on every player has multiple issues: concurrent edit could prevent the update, and the update takes non-zero time per player. So as you grow the title, it'll take longer to get through all players. So if your daily challenge is supposed to trigger at a certain time, some players won't have the update to that value for some indeterminate time after that. Instead, just have the client update (possibly through Cloud Script, if you want it to be secure) a timestamp of the last time they did the daily challenge. That way, you can simply determine their eligibility for the latest challenge by checking that.

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 bxaxvx · Dec 14, 2017 at 11:46 AM 0
Share

I turned on PlayStream option. Also, I noticed that "Reset daily challenge" task is not running at all, at least it's not displayed in 100 most recent task execution list. It didn't run today, and it is not running when I am trying to execute it manually. So, for now, I made another scheduled task with the same function as a temporary workaround. And I'll remake daily challenge feature as you suggested.

avatar image Brendan ♦♦ bxaxvx · Dec 14, 2017 at 04:17 PM 0
Share

My concern is that you're trying to start two Scheduled Tasks at 00:00 UTC, when your limit of the number of concurrent tasks you can have running is 1, since you're in the Essentials tier. One of those tasks is title-level and should run extremely quickly, so it's possible that most of the time it's done by the time the service is attempting to start the other, but if it isn't, that would block starting the task that runs over the user segment.

avatar image

Answer by Brendan · Dec 13, 2017 at 07:09 PM

What is the Title ID, so that we can have a look at it?

Comment

People who like this

0 Show 1 · 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 bxaxvx · Dec 13, 2017 at 09:01 PM 0
Share

F82B. Thank you!

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

    2 People are following this question.

    avatar image avatar image

    Related Questions

    Empty Custom data for item instances 1 Answer

    Temporary storage issue, please retry request. Service Unavailable 503 2 Answers

    Duplicate firing of scheduled tasks? 1 Answer

    Players not being populated into Players Panel 1 Answer

    Player Publisher data not updating 3 Answers

    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