A Pharaoh would rule until he either died or was deposed. It was not uncommon for a Pharaoh to be assasinated. On average a pharaoh ruled about 10 years, but some ruled much longer than that, while...
Cleopatra ruled for 17 years.
He ruled for 42 years.
she ruled for 22 years and 9 months Hatshepsut ruled from 1473-1458 B.C. (15 years)
Cleopatra ruled firmly from 47 to 30 BC. a span of 17 years. However she technically became queen four years earlier, but was deposted.