The chief executive officer of every city having a lockup shall appoint some competent person of good character and of the sex other than that of the chief of police as a jailer, who shall have exclusive charge of all persons of the jailer’s sex committed thereto, and see that they are kept in a room separate from prisoners of the other sex. The jailer shall receive such compensation as the governing body shall determine, not less than $5 for each day or fraction thereof during which a prisoner of the jailer’s sex is confined therein.