Doors should be closed while a school bus is being driven, except when:

The doors of a school bus must be kept closed any time the bus is moving, except when it is crossing railroad tracks.
DMV Writen Test