At some point in Sliders, the group begins to say that they will be stuck in a world for 29 years if they miss a slide. How do they know this? Is there an episode where they discover this? How is it explained?
The period of 29.7 years was supposedly predicted in the (real-world) EPR paradox proposed by Albert Einstein, the father of temporal physics.
Although it's not explicitly stated in the episode, it would seem highly likely that Quinn used these same algorithms when working out how to build the timer device. This would also explain how the timer knows how long they have to spend on each world before they can open another portal:
DIANA: You're stuck here for 29 years.
MAGGIE: How did you know that?
DIANA: That period is one of the predicted algorithms in the EPR paradox.
REMBRANDT: Whatever. It's been one of the rules since the 'get-go.'
As to why this period was chosen (out-of-universe), it was simply a writing decision that creates a sense of urgency:
How come a window can be “minutes on some worlds and months on others” – why not years, or even 29 years; if the next window is 29.7 years (if they miss their slide), why are their stays limited to minutes or months, and not years (besides the obvious TV complications this would present to the series)?
"I could give you a pseudo science answer, but the real reason is whatever serves a given story. Besides which, it’s fun to have them one place for an hour in one story and a few days in another, it shakes up the mix." - MARC SCOTT ZICREE Interview: SLIDERS CYBERCON ’98
What is the significance of the 29.7 years?
"That’s just one of those silly rules that, you know, you have to come up with for these things and it sounded better than 30. Because 29.7 years, we used to all go around… I got a lot of flack from that from other people. I mean, 29.7… in fact, it really bothered Bob Weiss. He kept insisting it’s gotta be a nice, round figure. I said, I am not budging on this! It’s 29.7!" [Laughter] - TRACY TORMÉ Interview – DRAGONCON 1999