The Messenger of Allah ﷺ said, "A day spent guarding the frontier in the path of Allah is better than the world and everything in it. The space taken up by the whip of one of you in Paradise is better than the world and everything in it. An evening journey or a morning journey that a servant undertakes in the path of Allah is better than the world and everything in it."
أن رسول الله ﷺ قال: رباط يوم في سبيل الله خير من الدنيا وما عليها، وموضع سوط أحدكم من الجنة خير من الدنيا وما عليها، والروحة يروحها العبد في سبيل الله أو الغدوة خير من الدنيا وما عليها.
Bukhari narrated it in the chapter on jihad (2892) from Abdullah bin Munir, who heard Abu Nadr, who said, Abdul-Rahman bin Abdullah bin Dinar narrated to us, from Abu Hazim, from Sahl bin Saad Saadi, who mentioned it. Muslim narrated it in the chapter on leadership (1881:114) through Thawri, from Abu Hazim, limiting it to the last part.