It wasnarrated that Ubayy bin Ka'b said:
"The Messenger of Allah(ﷺ)said: 'For guarding the frontier for a day in the cause ofAllah,defending the Muslims, seeking reward, apart from in the monthofRamadan, there is a reward granted greater than worshipping for ahundred years, fasting and praying. Guarding the frontier for a dayinthe cause of Allah, defending the Muslims, seeking reward, in themonth of Ramadan, is better before Allah and brings a greater reward"– I think he said – "than worshipping for a thousand years,fastingand praying. If Allah returns him to his family safe andsound, no baddeed will be recorded for him for a thousand years, buthis good deedswill be recorded, and the reward for guarding thefrontier will cometo him until the Day of Resurrection."
English reference: Vol. 4, Book 24, Hadith 2768
Arabic reference: Book 24, Hadith 2873