If you applied through proper channel, then after receiving the appointment letter, you will apply for release order to the Sub Inspector of Schools. You may ask for LIEN for 1 year. This LIEN period may be increased and for 1 year. If you want to return to your previous post, then you may do this before completion of 2 years LIEN.
If there is no relation between two jobs, then you will resign from your post and join for new one.