Exposed cottage padlocks are prone to corrosion and debris infiltration, making them sticky or impossible to operate. But don’t treat them with WD-40 alone: while a quick squirt might get the lock working, WD-40 is more of a solvent than a lubricant and will displace the lubricants inside a lock, leaving it open to corrosion. (What little lubricant is in WD-40 doesn’t stick around very long after application.)
Instead, clean the padlock with lots of WD-40, then lubricate it through the shackle openings with a few drops of very fine machine oil, such as 3-in-1. (Heavier oils attract dirt and cause sticking.) Then spray a Teflon- or silicone-based lubricant into the keyway.
Keep an exposed lock from sticking by protecting it from the elements. A cover flap of leather, plastic, or rubber from an inner tube attached to the door frame above the lock works wonders, shedding water and keeping dirt out.