2 weeks.
We have a park that has 2 EX eligible gyms in the same cell.
Each week one is locked for an EX, and we trigger the other one.
Rinse and repeat.
Every second week the same gyms will have an EX raid.
The same park has another 3 gyms in a different S2 cell, that rotate, so they can take longer to come back to the same gym.
EDIT We have failed to trigger some weeks, but the answer of 2 weeks is still valid