It's not really easy to create it because the things that you would try to do has not a precise cycle. So you have to find something that could recognize when game starts and when game ends. Actually I am not sure that you could find it. The only alternative could be a bot that assigned the x,y of the "start a game" and "finish game" will repeat this in a continuos cycle.