At one area of my shop, I have a fluorescent light hanging just above head level for task lighting in that area. Often needed even in the daytime. Pullchain switch in the end of the fixture. Now approaching 30 years of use, the switch got balky a couple of weeks ago. So I bought a new switch-- over $5.00 and imported. Planned to swap the switch this morning. Just as I reached the fixture location, the thought occurred to spray it with WD-40. So I unplugged the light, shot of WD-40 into the switch at the chain opening, operated it about 4 times and waited until this afternoon to put power to the light again. Switch works perfectly. The new one is in the drawer where it probably will soon be forgotten and not remembered if it should really be needed.
This will work on ceiling fan switches also.