question

Matthew Williams avatar image
Matthew Williams asked

Time Remaining on a Scheduled Tasks. Is it impossible to get this to display to in game

So in my game i have created different stores that are changed with a data value that is updated on a scheduled task, meaning i can create a load of stores and have the rotate in game automatically based on scheduled task calls.
However i wish to display the time remaining in game to show how long said store is available for before it is changed. Is there any current way to do this as from what i gather, anything task related is admin, meaning even just getting time until next call is impossible through game and scripts.
Any ideas ?

tasksscheduled tasks
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

·
Seth Du avatar image
Seth Du answered

PlayFab doesn’t provide any API that can retrieve the remaining time for a Scheduled Task, since the Scheduled Task can use Cron expression to define the recurring time, you may also define it in the client for reference. A work around solution is to store it in Title data so that each client will share the same data from the Title.

3 comments
10 |1200

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

Matthew Williams avatar image Matthew Williams commented ·

How would i go about that though ? Can you save time data from a cloud script to title data ? im using Unreal Engine if it helps

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Matthew Williams commented ·

First, you should know that the counting down time cannot be guaranteed to be identical as the real remaining time of Scheduled tasks.(I think it will be fine because it is only for reference.) Then, for example, if you have configured the Cron Expression as executing task on 2:00 PM every day, you need to also store it in the title data. Player's client will retrieve the Cron Expression and translate it into timestamp, then compare it with the client current time to come out the remaining time.

0 Likes 0 ·
Matthew Williams avatar image Matthew Williams Seth Du ♦ commented ·

thank you. I have actually been playing around yesterday since your first response and managed to get it working in game :)

1 Like 1 ·

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.