Sign In Register

How can we help you today?

Start a new topic

When does BulkScheduler picks the players to run the script ?

We are using the BulkScheduler to schedule sending a delayed pushed notification to players (once a 48 hours event is almost completed, 2 hours before the end) :


Spark.getBulkScheduler().submitJobModule({}, "WarnLeagueSoonEnded", Spark.getData(), ((2*24)-2)*60*60);


So we put a delay of 46h (translated in seconds of course). The goal of this line is to capture all players (with the {}) and make them run the script that checks if they're eligible for the push notification, after 46h.


What happens if a new player is created before the timer expires and the job starts ? Does the Job generate the list of players to run the script from as soon as this line is called, or does it wait for the end of the delay (here 46h) before getting the list of players ?

1 Comment

Hi,


Only the players that match the query at the time of scheduling will be included in the job itself. So anyone created after this won't be included. Targeting all players like this generally isn't a good idea. It's better to target the more active players. Messaging players like this will count towards your MAU count for the month so it may be better to be selective here. Maybe only message the players who are taking part in the event perhaps ? If you have any further questions then just let us know.


Regards,

Liam

Login to post a comment