Taanit, Chapter Three, Mishnah Seven
Generally, one does not fast or sound a shofar blast in alarm on Shabbat. However, sometimes disaster is so imminent that they sound a blast even on Shabbat.
We should note that there is a debate concerning whether they fast on Shabbat.
1) For these matters they sound a blast even on Shabbat: if a city is besieged by Gentile [troops] or a river, or if a ship is foundering on the sea.
2) Rabbi Yose says: [they sound a blast] for help but not for an outcry (for the sake of prayer).
3) Shimon the Yemenite says: also for a plague, but the sages did not agree with him.
Section one: The impending disasters referred to here are so immediate that they would blow the shofar even on Shabbat. However, on all other occasions they would wait until after Shabbat to begin blowing the shofar and fasting.
Section two: Rabbi Yose says that they blow the shofar so that people will come and help but that they dont blow the shofar on Shabbat as part of a prayer ritual. Accordingly, the special prayers are not added on Shabbat.
Section three: Rabbi Yose says that a plague should also belong on this list. However, the other sages do not agree with him. According to their opinion, a plague is less of an imminent danger and hence they mention it above in mishnah four.