In the seventh year Jehoiada decided to do something. He made an agreement with the commanders of the groups of a hundred men: Azariah son of Jeroham, Ishmael son of Jehohanan, Azariah son of Obed, Maaseiah son of Adaiah, and Elishaphat son of Zicri.
They went around in Judah and gathered the Levites from all the towns, and they gathered the leaders of the families of Judah. Then they went to Jerusalem.
All the people together made an agreement with the king in the Temple of God. Jehoiada said to them, "The king's son will rule, as the Lord promised about David's descendants.
Now this is what you must do: You priests and Levites go on duty on the Sabbath. A third of you will guard the doors
A third of you will be at the king's palace, and a third of you will be at the Foundation Gate. All the other people will stay in the courtyards of the Temple of the Lord.
Don't let anyone come into the Temple of the Lord except the priests and Levites who serve. They may come because they have been made ready to serve the Lord, but all the others must do the job the Lord has given them.