Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Reboot problems.

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am running 3 windows 2000 SP1, metaframe 1.8 SP2 servers. I want to run a reboot every night. It was working, now it is not. I have the scheduled tasks to run once a night. When I check the servers in the morning it says "It is safe to turn off your computer now". What do I do? I have 2 batch files run.
stop.bat
CDcd winnt\system32
net.exe stop icabrowser

reboot.bat
CDCD winnt\system32
tsshutdn.exe /reboot

Are these correct? If so, why won't the servers reboot?

When I check the event viewer there is an error in the system event log ststing the previous system shut down was unexpected.
 
I use the shutdown command from the NT 4 resource kit to perform a daily reboot of my Win 2000 Citrix box and it works good.

Here is my command line.

c:\ntreskit\shutdown.exe \\servername /r /c

 
Citrix Systems also recommends that you issue a NET STOP SPOOLER prior to shutdown. This shuts down the print spooler and tends to result in cleaner reboots. - Bill

"You can get anything you want out of life, if you'll just help enough other people get what they want" - Zig Ziglar
 
This is a batch file I created sometime ago. I hasn't failed once since I implemented.

**************************************
REM * Citrix reboot file
REM * Reboot every Wednesday 12:00 P.M
***************************************

REM * Disable logon so new users can't logon
change logon /disable
REM * Broadcast Server Shutdown
msg * Server will reboot in 5 minutes, please save all work and log off now!
REM * Pause first 3 minutes
C:\WINNT\sleep.exe 180
REM * Broadcast Server Shutdown again
msg * Server will reboot in 2 minutes, please log off.
REM * Pause for 60 seconds
C:\WINNT\sleep.exe 60
REM * Reset all ICA/TCP sessions
echo y | reset session ica-tcp
REM * Stop print spooler for 30 seconds
net stop spooler
C:\WINNT\sleep.exe 30
REM * Delete all stalled print jobs and delay for 20 seconds
Del /S /F /Q C:\Winnt\system32\spool\printers\*.*
C:\WINNT\sleep.exe 20
REM * Shutdown Server
C:\WINNT\Shutdown.exe /L /R /Y

Note: Remember the /Y after the shutdown command. Shutdown.exe and sleep.exe copied to the C:\WINNT directory.

Good Luck
 
I had the same problem. I found out that if I locked the computer at night, or was logged off, then it would not reboot. However if I was logged on when the script ran, everything was fine. So, until I find another work-around I have been locking the computer room and leaving my Citrix Server logged into a session so that it will reboot. Not a good solution at all I realize.

There is also a security setting in Windows 2000 that will allow the computer to reboot from a locked session. I am in the process of finding it and setting it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top