There's a script shown in Chapter 5, Example 5-1 of Automatic Exchange Betting that does (almost) exactly this, except it automatically fetches and stores all win market Ids for today.
To get tomorrow's ids, you just have to change the variable shown there as $date_today to $date_tomorrow (by specifying tomorrow's date, which can be done programmatically), then schedule the script.