Experts believe that it is rare for school-related violence to happen out of the blue. These events are most often carefully planned and developed. According to Alberta violence threat risk assessment teams, perpetrators leave enough indicators to alert those paying attention, and spotting the signs before it escalates to stop violence before it starts.
https://www.nytimes.com/2014/05/27/us/limits-to-law-and-information-sharing-despite-gunmans-danger-signs.html