Remember that Ultron is one of Stark's creations and the cradle contains a physical body for Ultron. The problem is that they can't just destroy the cradle because the Mind Stone is in there. From the transcript
Dr. Helen Cho: He's uploading himself into the body.
Steve Rogers: Where?
Dr. Helen Cho: The real power is inside the Cradle. The gem, its power
Jarvis (Just A Rather Very Intelligent System) is artificial intelligence.
He has/had capabilities to perceive it's environment and take actions accordingly to achieve its goal, which in this case would be stopping Ultron. There are 3 ways the protocols would have been implemented 1) Tony preprogrammed them into Jarvis system.
2) Jarvis preprogrammed his ...