Don’t know how it works in American sports because they always have to do things in their own way but for virtually all other sports the league determines the schedule in terms of matchweeks through some kind of draw. This assigns some default day/time to each game (for example, in Portugal this is every Sunday at 4pm).
The teams are then free to reschedule the games as long as both teams are in agreeement. The final scheduling is usually dictated by whoever owns the tv rights to the games.
Latest Answers