Arthur Schopenhauer said this quote

Life swings like a pendulum backward and forward between pain and boredom.