I have a MetaFrame XPe FR3 server farm. I am trying to figure out how to setup a reboot script for the servers so that it checks to see if there are users logged in with Active sessions before rebooting.
I have users globally and have a small window to reboot the servers in, but I would like to do this as seamlessly as possible. I'm no scripting guru but here is the basic logic I would like the script to follow:
DISABLE NEW METAFRAME LOGINS
NOTIFY USERS THAT THE SERVER WILL BE REBOOTED IN 15 MINUTES PLEASE LOGOUT
WAIT 15 MINUTES
CHECK TO SEE IF THERE ARE ANY ACTIVE USERS ON THE SERVER
IF ACTIVE USERS WERE FOUND THEN GOTO RE-ENABLE LOGINS
IF NO ACTIVE USERS WERE FOUND THEN REBOOT
RE-ENABLE LOGINS
END
I know that I may end up with a server that doesn't get rebooted at each scheduled time, but it is critical to prevent users from loosing data they are trying to input. I'm open to using VBSCRIPT or KIX or whatever anyone might suggest, but I'm having trouble finding the syntax necessary use the logic to check for active sessions. Any help is greatly appreciated!
I have users globally and have a small window to reboot the servers in, but I would like to do this as seamlessly as possible. I'm no scripting guru but here is the basic logic I would like the script to follow:
DISABLE NEW METAFRAME LOGINS
NOTIFY USERS THAT THE SERVER WILL BE REBOOTED IN 15 MINUTES PLEASE LOGOUT
WAIT 15 MINUTES
CHECK TO SEE IF THERE ARE ANY ACTIVE USERS ON THE SERVER
IF ACTIVE USERS WERE FOUND THEN GOTO RE-ENABLE LOGINS
IF NO ACTIVE USERS WERE FOUND THEN REBOOT
RE-ENABLE LOGINS
END
I know that I may end up with a server that doesn't get rebooted at each scheduled time, but it is critical to prevent users from loosing data they are trying to input. I'm open to using VBSCRIPT or KIX or whatever anyone might suggest, but I'm having trouble finding the syntax necessary use the logic to check for active sessions. Any help is greatly appreciated!