Here's a basic way to do it, using a few macros that call each other:
This is the setup for one of the groups, but you would set the other one up the same way.
In this example, the trains are on modules L1 to L5, and the macros are on M1-M5.
Macro M1 On:
If Flag 2 is on then (Allows for breaking out of the macro loop - explained below)
L1 On (turns train on)
Delay 1 minute
L1 Off (turns train off)
M2 On (calls next macro)
End of Macro
Macro M2 On:
If Flag 2 is on then
L2 On
Delay 1 minute
L2 Off
M3 On
End of Macro
Macro M3 On:
If Flag 2 is on then
L3 On
Delay 1 minute
L3 Off
M4 On
End of Macro
Macro M4 On:
If Flag 2 is on then
L4 On
Delay 1 minute
L4 Off
M5 On
End of Macro
Macro M5 On:
If Flag 2 is on then
L5 On
Delay 1 minute
L5 Off
M1 On (calls first macro in the sequence, starting the loop over again)
End of Macro
You can create separate macros to turn on and off Flag 2 (It has been suggested to avoid using Flag 1 as it has been unreliable in the past). Turning off Flag 2 will stop the sequence when the currently running macro ends (since the next one will start, see the flag is off, and stop). You can restart the chain at any point by turning the flag back on, and starting any one of the 5 macros. You can also run each train manually using their L# addresses.
You can add a condition (such as time of day or day of the week), if you want.
The other set would be done the same way, just using a different flag (if you want to operate them independently of each other - so stopping one doesn't stop the other one), and a different set of macros (L6-L8 and M6-M8, for example).
I hope that was pretty clear.