Well, since the leaders of the fortress are pretty high level, I am guessing they have magical means to communicate emergencies.
But, as the poster above stated, think of China before the Great Wall – a series of border forts that mutually support each other. Most likely, before the bad guys get to the border fort, there will most likely be either smaller border forts or watch/signal towers closer to the border. They will be crewed by a small staff of professional soldiers (probably rotated in fairly regularly, as it is dangerous) and a small support staff. They will have some means of signaling an enemy advance to the main border fort – along the lines of always prepared fast horses, some magical means, mirrors or fire or smoke signals. Probably at least 2 or 3 means in case of emergency. The watch towers will work in conjunction with scouts and patrols and serve as a temporary base of operations and place of rest. They are not designed for long term sieges – most likely just to hold out long enough to signal the main border fort, and then they withdraw back to the border fort, maybe triggering a well placed avalanche in the mountains to slow the bad guys down.
The actual border fort will most likely be in a very defensible area (hilltop surrounded by open ground, river ford) , and will also have means of contacting other forts in case they are besieged, as well as having a good supply of fresh food and clean water on hand. In addition to your ninth level cleric, they will also have a good amount of expert/commoner types with ranks in the Heal & Herbalism skills. This will be to help out in times of need & heavy casualties, as the high cleric and the other divine casters may not be enough to heal all the wounds in a hard attack (imagine a dragon swooping down, blasting a few walls with fire, knocking down some buildings inside the fort, then dropping a few boulders from a few thousand feet for good measure…scores of casualties, and probably too many for the divine casters to get to at once)
For every two active fighter/warrior types, I would have about one support person (cooks, blacksmiths, armorers, bowyers, fletchers, etc). This would not include any family members the soldiers have in the fort, as for a big attack, they might have the women & children withdraw farther back into the kingdom. If the soldiers are there for the long term (more than a year), they would need family there most likely. So, if you have 300 soldiers in the fort, I would say anywhere from 140-160 supporting personnel not including family. I would not have a lot of heavy cavalry, other than for the shock charge. Fast, light cavalry would be good for skirmishing and harassing the enemy flanks. Quick Muslim horse archers caused a lot of damage to heavily armored, slower Catholic crusaders in the Middle Ages – launch a few volleys of arrows and then retreat when the heavy knights charged, and pretty soon the heavily armored knights are exhausted. It might work well against disorganized orcs and goblins as well. Pepper them with arrows from the flanks, the orcs get mad and charge, the horses retreat quickly, then pepper the still charging orcs with a few more arrows, retreat a little more, etc.
I would have a mix of bowmen and crossbowmen on the walls, and in arrow towers. And, of course, catapults & ballistae. If it is a large enough fort, it could support a large trebuchet (think big stationary catapult) or mangonel as well.
The fort will also need to have enough size to support any local farmers that retreat to the fort in times of need, as well as the men from the watch towers...