The governing board of every city and village may employ at labor on the public streets and other public improvements, persons confined in the jail of such city or village, as the case may be, on account of conviction for violation of statutes or ordinances. The governing board shall prescribe rules and regulations governing employment and safekeeping, and determine what compensation, if any, such prisoners shall receive for their services.