Friedrich Nietzsche said this quote

If, in all that you wish to do, you begin by asking yourself: am I certain that I would wish to do this an infinite number of times? This should be for you the most solid centre of gravity . . . My doctrine says, the task is to live your life in such a way that you must wish to live it again - for you will anyway! If striving gives you the highest feeling, then strive! If rest gives you the highest feeling, then rest! If fitting in, following and obeying give you the highest feeling, then obey! Only make sure you come to know what gives you the highest feeling, and then spare no means. Eternity is at stake! This doctrine is mild in its treatment of those who do not believe in it. It has neither hell nor threats. But anyone who does not believe merely lives a fugitive life in the consciousness of it.