question

brendan avatar image
brendan asked

How long until a task executed on a specific player

Question from a developer:

I'd like to be able to tell the player the time remaining until a certain scheduled task will run for that player account. What's the best way for the client to retrieve this info?

scheduled tasksPlayStream
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

·
brendan avatar image
brendan answered

Realistically, there's no way you can provide that info to the user with any degree of accuracy, unless the number of players is relatively small. Scheduled tasks run on your users at the rate shown in your title's limits ("Scheduled task player processing rate"). And since order is not guaranteed, it's not possible to calculate where, specifically, the player is in that queue. If this is for segments that you believe will always stay small, you could use the time you specify for the start of the Task as an approximation, but you'd need to be careful to monitor the size of the Segment(s) you're running Tasks against, to make sure it's not getting too far off from that.

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.