The compensation of such police officers shall be provided by the persons petitioning for their appointment. Their duties shall cease upon notice to that effect, filed by the county commissioners in like manner as the record of appointment, and upon due notice thereof to such officers.