1,363. Reasons to Declare a Communal Fast

Hilchos Taaniyos 2:1

We fast and sound trumpets for the following types of communal crises: troubles caused by our enemies, an armed regiment passing through, a plague, a wild animal, locusts, certain types of agricultural blight, falling buildings, an epidemic, loss of sustenance, and rain.

Hilchos Taaniyos 2:2

A city besieged by any of these troubles should fast and sound trumpets until the troubles pass. Residents of surrounding areas should likewise fast but they do not sound trumpets; they should also pray for God’s mercy on those being afflicted. We do not cry out or sound trumpets on Shabbos, as was previously discussed, except for the loss of sustenance. In that case, we cry out even on Shabbos, though we do not sound trumpets.