Leaving your rifle cocked

If I'm pesting or hunting, hammer is cocked and there's a round in the chamber, safety on, trigger finger alongside stock. Works for me, just recently I missed an great opportunity on a rat... Because my hammer spring was not cocked, I squeezed off, nothing! Rat gone, me?, very upset.
1f601.svg
I only load 9 pellets in my 10 round mag. This way I decock over the empty hole in the mag for my initial outing. If I don't take a shot and want to decock with one in the chamber? I simply pull out magazine, rotate it to the second empty hole, replace magazine, close bolt while decocking through empty hole. Now I have an uncocked gun with one in the chamber. If a shot presents itself, I simply cycle the bolt and take a shot,

I'm not quite sure of your routine, as you first mention hunting with your rifle cocked and loaded, but then discuss decocking on a loaded chamber. I'm in the habit of always handling the gun decocked, and I don't cock until ready to shoot. The routine varies a little with different rifles, but it is a rule I rarely break. I've had two accidental discharges in my life, both with cartridge weapons. Luckily, neither resulted in injury, but it is a scary experience, and one I don't intend to repeat. The potential for missing a shot opportunity is a small price. 
 
I never cock my PCP rifle until I am going to shoot. However, if I am hunting and cock my PCP rifle & then don't shoot , i do not uncock it. In a short time I shoot at game. Then I do not cock it again until I am ready to shoot again. So for a short period of time I rely on my safety. I am not concerned about the rifle being cocked & reducing the hammer spring for that short period. Never leave one cocked for more than an hour. I imagine some consider it unsafe to carry a cocked rifle around & rely on the safety. However that is how I done my PB guns for over 50 years now. Would be hard to kill a wary eastern whitetail when I have to cock my loud bolt action rifle. Or even harder to load a 12 gauge 3 inch magnum into the chamber when a turkey gobbler is 40 yards away & closing the distance. Like to give em a fair chance, but draw the line there,. The nice thing about most PCP rifles is you can cock them pretty quietly. I don;t recommned anything I do while carrying a rifle, I just say it works for me. 😁 
 
To answer the original question, it won't hurt it to leave it cocked. If it did, I'd be getting rid of the gun and consider it junk if the parts were that cheap. But it will be fine. Not a lot of stress to deal with. 

If you were concerned with the spring fatiguing, you better go check on the valve springs in your car engine, there are a few that have been compressed since you turned it off. 

Safety or ethical reasons are another matter, and you didn't ask or need opinions on that. 
 
If just shooting targets or plinking no. If pesting or hunting yes, the "monkey motion" required to cock a gun can alert some wary critters. There's no right or wrong way. As long as you use safe gun handling protocol. @elh0102, when I decock on a "loaded chamber" I simply rotate my mag two holes back, decock through open hole. There's still one in the chamber, if a shot presents itself, I simply cycle the bolt, mag advances to second open hole and I send the pellet. Sounds more complicated than it is to implement, falls under "gun handling".
 
In principle I don’t like having any gun stored with a round in the chamber, whether it’s a powder burner or an air gun. With my powder burners at the range I check the chamber, point in a safe direction (usually down range) and pull the trigger before I put it away. For my carry guns, similar procedure, except done at home; drop the mag, cycle the action, verify the chamber is empty, point in a safe direction and pull the trigger then put away in the safe.

For my air rifles, I always fire the pellet/slug that is in the chamber, check that the gun is unlocked, then put it away. When I pick up the rifle and am ready to shoot, that’s when I cock it. So far no squirrel has done anything to me that calls for a death sentence, (although there is a bloody chipmunk that’s gonna die soon for eating the fruits off the ornamental orange trees that my wife put out on the deck) so I don’t really walk around with it cocked. However for hunting purposes I can quite understand that it is simply not practical to always be unlocked. I still always try to cock as close to when I’m going to shoot as possible.
 
I would not leave it cocked for safety and I do believe it will affect the spring negatively over time. How much time is dependent on the metal, length of time, how much compression etc etc. I put a new main spring in my HW97. By leaving the gun cocked for a couple days at a time I was able to bring the fps power i down in small increments to exactly where I wanted it. Once there I stopped leaving it compressed and it has stayed right there for 3 years of light shooting.

With that said, springs are cheap and I use my guns however I want. They are a tool with wear componants which are expendable. If I wandered all day hunting again I would leave it cocked but I just target shoot and pest control so I have no need for that. 
 
I'm with katokevin. I decided long time ago no projectile in the chamber/barrel no accidental discharge. If you're hunting, round in the chamber or barrel, safety on. On unstable footing or climbing fence or whatever, empty the chamber/barrel. In this state guns must be unloaded when a vehicle. Had a few hunters shot through the chest, rifle between their knees. DOA