The incident took place just before noon Friday at 38th Street near 4th Avenue in Brooklyn.
The middle school was evacuated at around noon Wednesday after the fumes were detected.
Four people were treated after more than 100 people were evacuated from 330 West 42nd Street.
None of the injuries is believed to be serious, and all 12 should be released by Sunday night.
The two workers were overcome by the fumes in the middle of their routine residential garbage pickup.