Where six or more persons, whether armed or not, are riotously assembled, a district judge, magistrate, peace officer, or the chief executive officer of a city, town, village, or settlement shall go among the persons assembled, or as near to them as can be done with safety, and command them in the name of the state to disperse.