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!

Using tsshutdn command

Status
Not open for further replies.

pcfixr

IS-IT--Management
Sep 3, 2003
9
US
I would like to setup a script that shuts down and restarts my Citrix server everynight at say 4:00am.
does anyone have a good sample script that will do this?

Also where should the script be placed so that it works.

I also need to be sure that everything restarts automaticly as believe it or not there are actually a 1 or 2 people who get to the office before me.

Thanks
Greg
 
Can't you just use TSShutdn.exe in a scheduled task

C:\WINNT\system32\tsshutdn.exe 120 /reboot

Works like a champ for me. Thew 120 will wait 2 minutes after sending all the users a message to get off before restarting.

Jim
 
Create a cmd file called "AutoReboot.Cmd" and save it in ?:\Winnt

Add the following Two Lines :-

at 04:00 ?:\Winnt\System32\TSSHUTDN.exe /DELAY:120 /REBOOT
at 04:30 ?:\Winnt\Autoreboot.Cmd

Then run the cmd file and it will now reboot each day.

If you want to do it once, but if you reboot, you'll need to re enter it then do :-

at 04:00 /Every:M,T,W,Th,F,S,Su ?:\Winnt\System32\TSSHUTDN.exe /DELAY:120 /REBOOT

If you need any further help do "AT /?"

Cheers,
Carl.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top