Every contract, except for the purchase of material or supplies, involving the employment of laborers, workmen, mechanics, foremen or inspectors, to which the commonwealth or any county or any town, subject to section thirty, is a party, shall contain a stipulation that no laborer, workman, mechanic, foreman or inspector working within the commonwealth, in the employ of the contractor, sub-contractor or other person doing or contracting to do the whole or a part of the work contemplated by the contract, shall be required or permitted to work more than eight hours in any one day or more than forty-eight hours in any one week, or more than six days in any one week, except in cases of emergency, or, in case any town subject to section thirty-one is a party to such a contract, more than eight hours in any one day, except as aforesaid; provided, that in contracts entered into by the department of highways for the construction or reconstruction of highways there may be inserted in said stipulation a provision that said department, or any contractor or sub-contractor for said department, may employ laborers, workmen, mechanics, foremen and inspectors for more than eight hours in any one day in such construction or reconstruction when, in the opinion of the commissioner, public necessity so requires. Every such contract not containing the aforesaid stipulation shall be null and void.
Mass. Gen. Laws ch. 149, § 34