I mentioned previously that 'how' the PC can fulfil a quest will depend both on what the relationship is between party and patron(s), and on how open-ended the nature of the task is. I'll be looking at the second of these criteria in this post.
I'm pretty certain that a quest that is too tightly-controlled is not going to be as satisfying as an open-ended one. If the 'plot' is that the PCs must collect the relics of McGuffin from various locations, and the Sage Andonion tell the PCs to "bring the Spoon of Density from the Dank Citadel to the Unpr'Onounc'Eable Temple in 7 days for the Night of the Moon of Blood or all will be lost", this is a pass/fail situation. The party takes four days to get to the Dank Citadel, and another day to battle their way in to get the Spoon. Unless there's a dragon or magic carpet or teleport spell to get them back to the Temple double quick, they've already failed if they can't get it to the Temple in time.
There is nothing wrong with that setup that can't be solved easily, though. The 'dragon or magic carpet or teleport spell' could be real enough. Andonion could give the party a scroll and tell them, 'when you have the Spoon, read this scroll and you will be brought back to this place'. If they ask why they can't just do a 'reverse-scroll' to get them into the Dank Citadel, then the scroll is a homing-spell and will return to to the place it was made (the Temple, not at the Citadel)... Lord Doombad's return-point would be at the Citadel, but they don't have Lord Doombad's scroll. I like this idea, I may even institute it in a game.
Or, there could be a dragon (perhaps an enchanted or otherwise compelled one) who might be persuaded to fly our heroes home. Or the tapestry on the wall might turn out to be a magic carpet that the PCs could fly back on. There should be multiple ways of reaching goals. But putting in time-constraints just for effect is probably not the way to go.
Letting the PCs fail because they ran out of time is perhaps not the PCs fault, it's maybe bad DMing I think. If they've taken too long to get to the Citadel and now can't get back in time because they faffed around in the Forest of Illimitable Mulch for too long on the way there, then their way probably wasn't clear enough for them to do what you expected - unless the idea is that they fail. Which, I'd suggest, it isn't. It should be possible for the PCs to fail for sure, but I think it's peculiar to require them to fail. It's also pretty railroady, as much as requiring them to succeed would be.
'Bring the Spoon of Density to the Unpr'Onounc'Eable Temple because we can use its magical energy to bind Lord Doombad - but I urge you to hurry, his strength grows every day' is probably even better still, it puts a weak time condition on things that maybe will still be a motivator not to dawdle (as the 'Moon of Blood' condition) but doesn't have a binary pass/fail setup. Ultimately the PCs will still 'lose' if they take too much time but 'too much' is less clearly-defined.
The way wandering monsters work in a dungeon is in part dependant on how much time the PCs take to do things. 'Get in, don't search for traps and secret doors, kill monsters, take treasure, get out' will result in fewer wandering monsters than 'Get in, search carefully for traps and secret doors, kill monsters, take treasure, get out'. It will probably result in more deaths from traps, and less treasure from secret hiding places, than the second procedure. It's a balance the party must come to between being meticulous and being fast. And as a corollary, searching for secret doors should entail the party getting rewards some (most?) of the time. Else, why bother?
The same procedures can be applied to fulfilling quest-goals. Encounters in the wilderness or at the Dank Citadel should depend on how much time the PCs have 'wasted'. This why '... but I urge you to hurry, his strength grows every day' is probably a better time-condition than 'do this by then or all is lost'. All should not be lost. It may be harder ('... his strength grows every day' might equate in game mechanics to 'add another Gnoll patrol for each day spent in the Forest of Illimitable Mulch, and increase the level and number of the Undead servants at the Citadel by d6' for example, because Lord Doombad is resurrecting the dead of a thousand years of war in the environs of the Dank Citadel), but there shouldn't be a point where the PCs calculate that a conclusion is inevitable. If the actions of the PCs don't make a difference, then there's no point playing (others may disagree, but to me at least if player action is meaningless, in the end it's just the DM reading a story with the players providing some dialogue. Some people might want that. That's fine but it's not what I do). The loss of time leading to a build-up of enemy forces should be balanced by some possibility of reward (if it's a deliberate loss of time at least), and without it necessarily entailing the PCs breaking the quest.
So, the PCs get diverted in the Forest and go to the Vale of Silky Death in the centre of the woods. There they fight the Giant Spiders, who have nothing directly to do with the quest. The PCs acquire the Wonderweb Cloak (a powerful magic item in its own right that may help them in the quest) and also make allies of the Grubmen (who were the Spiders' slaves), but as a result Lord Doombad has recruited more Gnoll soldiers in the Forest, and when the PCs get to the Citadel there are more, and more powerful, Undead around.
The PCs could have saved time and bypassed the Giant Spiders, in which case, they'd have met fewer Gnoll patrols and faced less serious enemies in the Citadel, but wouldn't have the Cloak or the knowledge of the secret way into the Citadel that the Grubmen gave them. That is a reasonable trade-off, and even though the PCs shouldn't necessarily be able to calculate that in advance (they don't know the Wonderweb Cloak is there, they don't know the Grubmen could give them useful information), they should at least have the expectation that 'having adventures' will not be detrimental to the game. If the DM is penalising the players for exploration and adventuring, then I'd say something has probably gone wrong somewhere.
Going through the Vale of Silky Death, fighting the Spiders, rescuing the Grubmen and gaining the Cloak, means that instead of facing one Gnoll patrol and finding 10 Skeleton guards at the Dank Citadel, they fight two Gnoll patrols and find 14 Zombie guards. If they also go to the Mountain of Mumbling Medusae and fight the residents there, they might get their hands on the Mirror of Madness and befriend the Rockmen; but then they'll find three Gnoll patrols in the Forest and 19 Ghoul guards at the Citadel. If they also go to the Lake of Lachrymose Lycanthropes, the PCs can find the Flying Dagger of Flamfloon and get information from the Purple Pixies, but they'll run into four Gnoll patrols and 23 Wight guards, and so on.
So yes, if the PCs want to go off on side-quests it should be a question of balancing risk and reward (roughly, because they shouldn't necessarily know the specifics). They have been warned that Lord Doombad will grow stronger if they delay, but they should also have an inkling that there is more than one way to reach the destination. Otherwise it's just a railroad.
More, possibly much more, on this to come. With lots of diversions for interesting byways I suspect.