I don't talk much about the other side of that: The DM's point of view.
I mention that the player and the "adventure" should recharge at the same rate. But what does that mean in play? How do you "recharge" your adventure?
Fundamentally, you do this by considering what the enemy is doing while the party is resting. Depending on how long you party rests, your enemy teams may be capable of doing different things (one week gives them a lot more flexibility than one night!), but the ultimate fact is that while the party is sleeping, an enemy group should be recuperating, recruiting, fleeing, assassinating, and otherwise changing the circumstances so that, when the party comes back fully rested, they find an equivalent challenge to what they left.
First, Identify The Conditions
You should set some goal for your party to have "completed" the adventure, or one part of the adventure.
If we look at 4e as a baseline, you might set each adventure to be completed after 3 encounters (one 4e "adventuring day"). So you'd have roughly 3 days of "adventures" in one level.
Note that these might come one at a time, or all at once, or whatever. The real point is to have the same number of successful die rolls necessary to accomplish that goal. The balance of daily resources is based on that. Those die rolls could be in fighting monsters, or in talking with them, or in figuring out a mystery, or in exploring a wilderness, or in fighting one dragon, or in fighting 30 kobolds, or in fighting a chain of 10 slaadi, or whatever. You simply need to identify how many successful die rolls it takes to accomplish the goal, and then ensure that the party can't break up those die rolls.
Next, Use The Carrot
The first thing to do is to tie the party's rewards directly to the conditions for completion: the treasure is guarded by three groups of goblins, or the captives are held in an orc camp with three groups of orcs. What the party wants is beyond these encounters. Until they complete them, they get nothing.
This rewards the players for pushing forward: there is something at the end.
Obviously, treasure and other items (or NPC's) can be located in a well-protected, well-guarded room that demands the party endure a series of encounters before they access it.
The orc chief or the kobold king can be well-defended, equipped with steadfast bodyguards. If the goal is to put an end to the enemy leader, it mandates passing though waves of underlings to reach them.
You can opt to reward XP only after the completion of the adventure. In this way, having a single combat doesn't reward any XP: only tackling the entire adventure (the 3 encounters) nets the XP. This is rather blatantly a game construct, but it can be very effective.
If the wilderness is assumed to be hostile, a safe haven can be an award at the end of a series of challenges that cannot be had while engaged in those challenges. The safe haven allows an opportunity to rest, but also affords the character party healing, equipment repair, resupplying, and other useful things that are difficult or impossible to get when away from a safe haven.
Then, Use The Stick
There's a few ways you can reinforce the need to press forward from the back, too.
If the party takes an extended rest, the carrot is forfeited. The hostages are sold on, the sacrifices are killed, the treasure is used by the monsters. The reward is taken away.
This can be very final: if you use this, then you likely won't be re-using the same adventure. You can mitigate this by making it less binary: every day, half the hostages are killed, or half the treasure disappears. This leaves some reward for completing the adventure (up to a certain point), but still provides a "cost" for failure.
The area the party takes an extended rest in should be considered dangerous until made otherwise. That is, if the party tries to sleep, they will likely be attacked by something. This prevents them from taking an extended rest: when they stop, they are still subject to the encounters in the area, until there are no more encounters left. If they rest after one encounter, the other two come and find them when they're asleep.
The most obvious "recharge" method is simply for the enemies that are left to resupply their troops in the time it takes the party to rest. The orc camp sends a messenger to another nearby camp, the kobolds fix the traps the party sprung the first time, etc. The challenges can remain the same, but they perhaps should change, in response to the PC's actions. If they easily offed the first band of orcs, maybe the reinforcements are a little tougher, higher level, etc. If the party had trouble with a particular trap, maybe there's more of them the second time around.
Enemies can also flee the scene of the crime in the time it takes the party to rest. This is functionally the same as a "resupply," but it changes the lair and the layout, effectively "refreshing" the dungeon, presenting a completely new environment, possibly with different hazards and traps the second time around…assuming the party can still find the enemies. It is possible that the enemies can't be found after they flee, effectively making this like a time-based consequence. Enemy flight can also reinforce the party's failures: if they would've tackled the goblins the first time, the goblins wouldn't be alive to kill again.
Increasing the Stakes
For a blatant emulation of the "rising action" in a story, you might want to gradually ratchet up the consequences of the PC's NOT dealing with a particular threat. For example, if the goblins are not completely dealt with, they first kill some townsfolks, then they threaten the nobility, and finally the threaten the PC's own allies and friends. A three-stage process works fairly well for most of these, giving the player three "lives" in which to tackle the challenge before it becomes dangerously personal.
If the enemy forces consist of any characters that recover their resources after an extended rest (such as enemy wizards or clerics), these abilities also recharge when the party does. This is rather blatantly magical, but it is internally consistent, and it works well for enemies linked to magical abilities, or groups of humanoids that may have spellcasters among them.
Use A Combination
Reinforce the need for the party to press on using any or all of these options, or even more of your own design. The ultimate idea is the same: if the party abandons their adventure before they complete it, they fail the adventure and forfeit the rewards, and/or the adventure "recharges" and they must start from square one again. The upthrust is that the PC's cannot win against the enemy by gradual attrition: they cannot wear the enemy down to zero at leisure.
Other Adventure Types
The above largely assumes the archetypal D&D dungeon-delve-style adventure. However, because balance doesn't care what the die rolls are used for (or even really if they are die rolls), it's applicable beyond that. Mostly, what changes is the stick. For instance:
Getting to the heart of intrigue might replace all the combat encounters (with attack rolls) with scenes of investigation and interrogation (with Intelligence, Wisdom, and Charisma rolls). "Recharging" a mystery, stick-wise, is mostly about undoing the PC's progress, such as by murdering witnesses, trails that have gone cold, NPC's that turn into rivals, introducing red herrings, etc.
Finding a particular location or item in the wilderness might replace some or all of the combat encounters (with attack rolls) with environmental hazards such as inclement weather or dangerous obstacles such as raging rivers or scenes dealing with wild animals or hostile natives (with Strength, Constitution, and Wisdom rolls). If you want to "recharge" your exploration using the stick, you mostly want to undo their gains since the last rest. You can have the party get lost, stumble into some truly dangerous hazard, have the weather change the terrain, or have their supplies run out.