Well Elminster would probably planeshift the town before doing anything else. Unless the dragons are going to teleport from nowhere, you might have the players discover the dragons from a distance. They might see them flying towards town, a mile or two away, and then go to inform Elminster, who is probably already preparing for the battle. While Elminster is meeting to fight the dragons and preparing to planeshift the town, you could keep the players busy by having them help the city officials evacuate the town.
Another idea, is that as these dozen or two dozen dragons attack elminster, members of the Cult of the Dragon might actually attack the townsfolk. You could have the players be busy fighting them, and at the same time, describe what is happening to Elminster in the background. Then at the key moment, Elminster could cast his planeshift spell, right before he gets toasted by all the dragons, or something like that.