Safety first. City officials said it over and over again.

But yesterday, many children and teens, especially in the outer boroughs, waited outside for school buses for more than an hour, to no avail. Others walked in the streets because sidewalks were impassable. Some parents got stuck on unplowed roads, and there were some untouched streets and sidewalks in front of schools.

Although it was complicated, Mayor Bill de Blasio made the right decision to open schools after a massive storm hit the city Saturday, leaving up to 34 inches of snow. Thousands of students rely on the schools for warmth, food, nurture and care, beyond education itself. Thousands of working parents do not have a child-care alternative or understanding employers. Schools serve many purposes, and we can’t forget that. And in some cases, Monday actually was a typical day, with nearly full classrooms.

But once the city opens schools after a storm, it must be more mindful of everyone’s needs. That means communicating, publicly and immediately, that student and teacher absences, when unavoidable, won’t be counted. It means principals must be understanding and creative, so students and teachers who get to school can have a fruitful day, but won’t be penalized if they can’t be there. Perhaps, for instance, video calling could include those who are absent.

Beyond that, officials must do more to clear walks and streets that lead to schools, so children can get there safely. That means better coordination between the Department of Sanitation and the Office of Pupil Transportation, help from custodial staff, and more. School parking lots must be cleared and the city should arrange for teachers to park in nearby public lots where available. And officials would be well advised to improve school bus communication with parents. We’d love to see an app that someday could give families real-time bus locations and delay information.

NYC weathered the storm relatively well. Keeping the underground subway lines open, but banning other travel, helped. Many streets were clear by Monday morning. The city was up and running, and that’s worth applauding. But troubles in Queens, Brooklyn and elsewhere showed there are still lessons to be learned — in the schools and beyond.