In case you need to stop playing mid-battle, your battle remains as it was and will not go idle as long as it's not a time-based battle (a battle that requires to be completed within a set time). 

If you have to leave a time-based battle, the time will continue to run. The battle might end before you return to it.

If you close the Sorcery School app entirely without finishing the battle, you'll have to start the battle over when you reopen the app. The Energy spent to play the battle will not be refunded. Please make sure you complete a battler before closing your game app.