When approaching a railroad crossing while operating a school bus, you should generally:

In general, school bus drivers should stop before any railroad crossings to check the tracks for approaching trains. Drivers should stop no closer than 15 feet, and no farther than 50 feet, from the nearest rail in order to have the best view of the tracks. They should look and listen for approaching trains before proceeding through the crossing.
DMV Writen Test