@echo off
REM Set your panel values here, ID is the server ID we care about
set URL=http://localhost
set UN=admin
set PW=admin
set ID=1076

REM This script stops a server, waits until server is down, does some stuff, and then starts server

REM Shutdown server
uget.exe "%URL%" "%UN%" "%PW%" "%ID%" stop

REM Wait until panel confirms the server is stopped
uget-sleep.exe "%URL%" "%UN%" "%PW%" "%ID%"

REM Server should now be stopped, do stuff
REM ============= Enter your stuff here =================
echo Doing stuff
echo Doing more stuff
echo Doing even more stuff
REM ========== End of Enter your stuff here =============

REM Now start server back up
uget.exe "%URL%" "%UN%" "%PW%" "%ID%" start

REM to see output, un-REM the below line, leave it REM'd if using in an automated task
REM pause