They and their descendants were assigned to guard the gates of the Lord’s sanctuary (that is, the tabernacle).
They would spend the night in their posts all around God’s sanctuary, for they were assigned to guard it and would open it with the key every morning.