It was narrated that Ubayy bin Ka’b said:
“The Messenger of Allah (ﷺ) said: ‘For guarding the frontier for a day in the cause of Allah, defending the Muslims, seeking reward, apart from in the month of Ramadan, there is a reward granted greater than worshipping for a hundred years, fasting and praying. Guarding the frontier for a day in the cause of Allah, defending the Muslims, seeking reward, in the month of Ramadan, is better before Allah and brings a greater reward” – I think he said – “than worshipping for a thousand years, fasting and praying. If Allah returns him to his family safe and sound, no bad deed will be recorded for him for a thousand years, but his good deeds will be recorded, and the reward for guarding the frontier will come to him until the Day of Resurrection.”