Firefighters employed in the fire departments of cities having paid fire departments shall not be required to remain on duty for periods of time which will aggregate in each month more than an average of sixty hours per week. Each single-duty shift shall consist of twenty-four consecutive hours and shall be followed by an off-duty period as necessary to assure compliance with the requirements of this section unless by voluntary agreement between the city and the authorized collective-bargaining agent or, if there is no collective-bargaining unit, the firefighter, any firefighter may be permitted to work an additional period of consecutive time and may return to work after less than a twenty-four-hour off-duty period. Any firefighter may be assigned to work less than a twenty-four-hour shift, but in such event the firefighter shall not work in excess of forty hours per week unless otherwise provided by voluntary agreement between the city and the authorized collective-bargaining agent or, if there is no collective-bargaining unit, the firefighter. No agreement under this section shall allow a firefighter who is scheduled to work less than a twenty-four-hour shift and who holds the rank of fire chief or works as an immediate subordinate to a fire chief to fill temporary vacancies created by the absence of a firefighter who is assigned to work a twenty-four-hour shift and who holds a rank lower than fire chief. No firefighter shall be required to perform any work or service as such firefighter during any period in which he or she is off duty except in cases of extraordinary conflagration or emergencies or job-related court appearances.