Teachers can't resign at any time, because there is a labor contract between the teachers and the school. If they want to resign, they must notify their employers in writing 30 days in advance.
If it is a probation period, you can't resign at any time. You must explain your resignation and the corresponding reasons to the school three days in advance, or negotiate directly with the school.