(2) Such keeper shall cause each prisoner committed to his jail for imprisonment under sentence, to be constantly employed at hard labor when practicable, during every day, except Sunday but the Sunday exception shall not apply where a prisoner under sentence of intermittent imprisonment serves less than the five preceding days in the jail and the keeper has adopted an employment program designed especially for intermittent imprisonment, and the board of supervisors of the county, or judge of the county, may prescribe the kind of labor at which such prisoner shall be employed; and the keeper shall account, at least annually, with the board of supervisors of the county, for the proceeds of such labor.
(3) Such keeper may, with the consent of the board of supervisors of the county, or the county judge, from time to time, cause such of the convicts under his charge as are capable of hard labor, to be employed outside of the jail in the same, or in an adjoining county, upon such terms as may be agreed upon between the keepers and the officers, or persons, under whose direction such convicts shall be placed, subject to such regulations as the board or judge may prescribe; and the board of supervisors of the several counties are authorized to employ convicts under sentence to confinement in the county jails, in building and repairing penal institutions of the county and in building and repairing the highways in their respective counties or in preparing the materials for such highways for sale to and for the use of the state, counties, towns, villages or cities, and in cutting wood and performing other work which is commonly carried on at a prison camp, and to make rules and regulations for their employment; and the said board of supervisors are hereby authorized to cause money to be raised by taxation for the purpose of furnishing materials and carrying this provision into effect; and the courts of this state are hereby authorized to sentence convicts committed to detention in the county jails to such hard labor as may be provided for them by the boards of supervisors. This section as amended shall not affect a county wholly included within a city. Notwithstanding any other provision of law, an inmate may be permitted to leave the institution under guard to voluntarily perform work for a nonprofit organization pursuant to this subdivision. As used in this section, the term "nonprofit organization" means an organization operated exclusively for religious, charitable, or educational purposes, no part of the net earnings of which inures to the benefit of any private shareholder or individual.