Linda Lira, 31, must also maintain psychiatric treatment and was ordered to stay away from the victims and the Lemon Grove School District, according to Deputy District Attorney Jessica Paugh.
Lira pleaded guilty last month to felony child endangerment and misdemeanor battery.
She was working at Lemon Grove Academy on Golden Avenue just after 4 p.m. on March 25 "when she began acting bizarre'' and barricaded herself in a classroom with the children, San Diego County sheriff's Lt. Chris May said.
Students used Lira's unattended campus radio to call for help, he said.
"Staff briefly fought with Lira to gain access to the classroom and remove children from her reach,'' May said previously. "After students were evacuated, Lira exhibited multiple signs and symptoms of narcotics/hallucinogen use. While struggling with other school staff, Lira removed her own clothing as one act in a series of bizarre acts.''
When deputies arrived, Lira was barricaded alone in a classroom, where she upended desks, threw things around and undressed and dressed several times, according to the lieutenant.
Deputies arrested her and took her to a hospital for an evaluation, May said. Further tests showed that Lira didn't have any drugs in her system, according to authorities.