Prayer Skills-When Not To Pray-Shulchan Aruch
The 13th of Nisan is the Yahrtzeit of Rav Yosef Karo: When the city is under siege, or when an individual is being pursued, they are not permitted to fast and pray, for this may sap their strength. Instead, they should immediately accept upon themselves to fast and pray when they are saved, and do so later. (Shulchan Aruch, Orach Chaim 571:3)