Data distribution issue

I'm running a tournament and I need help evenly distributing the players. I have 9 players, 3 courts, and 5 time periods. There will be 3 players per court per time period. So, the data should/can look something like this:

Time period||Court1||Court2||Court39am||1,2,3||4,5,6||7,8,99:30am||1,3,6||2,5,8||4,7,910am||1,4,9||2,5,7||3,6,810:30am||...||...||...11am||...||...||...

A number can only be listed once per time period. No one can play in the same group of three more than once (ie group 1,2,3 can only play together in this threesome once during the tourney).

You would think that randomizing programs would make this an easy task, but it's not. Well, it's not to me at least.