HELP! How to make a lightbulb wing and forth forever

Hi! I can’t find any information or tutorial about this, I simply want to animate a lightsource on a cable from the ceiling swinging back and forth like in Silent Hill P.T. I know about cable actor but that is not the same thing, I simply want to make it go back and forth forever. How can that be done?