My game hosts an in-game tournament twice a week (Wednesdays and Sundays), that lasts for 24 hours. The goal is for players to get as far as they can in the game within 24 hours. I use a leaderboard to track their progress for this specific 24 hour time period and to display in-game so that players can see how they place against others and compete against each other for larger prizes.
I use a Title Data key-value pair to trigger the start of the tournament, by updating one of the values to the date of the tournament. I need to do this within a few hours prior to the server time hitting each Wednesday or Sunday. When the game notices today is a Wednesday or Sunday and it matches the Title Data key-value pair date, it allows the player to enter the tournament and begins tracking his stats. My question is - is there any way to automate updating this Title Data key-value pair every Wednesday and Sunday? I'm totally unfamiliar with cloud scripts - can I use one of them for this? Have a script automatically execute when the clock hits midnight on Wed/Sun and update a Title Data value with the current date?
Also, is there any way to automate resetting leaderboards outside of the normal daily/weekly/monthly intervals? I reuse the same leaderboards for these tournaments, meaning I need to manually reset them prior to each Wednesday and Sunday (twice a week, so obviously the normal intervals would not work). If there was a way to select specific dates or patterns for resetting leaderboards - that would be fantastic.
I realize I probably set up these tournaments in a silly, inconvenient way with all these restrictions - but it is too late to change anything now :).
Please let me know your thoughts or if you need any more information.