rebooting a presentation server on a scheduled bases

need a tried and tested way of rebooting presentation servers on a regular basis. tried citrix reboot option in the console but it causes the server to shutdown unexpectdly. disabled this option in the console and looking for a safe option for rebooting presentation servers automatically on a fixed schedule.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Brian PiercePhotographerCommented:
Schedule the
shutdown /r /f /m \\ServerName
command from within Windows.
mgmohiuddinAuthor Commented:

well i know this but remember its a citrix server with users conected. i need to send them a message, wait for 10 mts, restart spooler, delete printers which are auto created. so i am not talking about rebooting a server. rebooting a citrix server which has active users. thnx for your prompt reply. but cant do it this way
What version of Citrix are you using?  I have used the built in option with no issues from version 4.0.  Earlier versions were flaky and I stayed away from them.

Otherwise take a look at  They have some pretty good products I have used in the past including a reboot scheduler.
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

the shutdown command has an option (/c) to show a comment to the users and a /t for a timeout

if you need to wait 10 minutes I would set up a couple different batch files to run and schedule them via the windows task scheduler.  Create a batch to restart the print spooler, delete printers, etc... and then just set the timing accordingly.
I use shutdown PLus CR.  I have had good luck with it
try this script on the application server
Bye Gastone
@echo off
:: RebootAppserver.cmd
:: Gastone Canali
set FoundUser=0
set wait=1
:: verify if there are active users
(query user |find "Active")&& set FoundUser=1
if %FoundUser% EQU 0 goto :_REBOOT
set wait=600
:: send a message to Active users
msg * "Reboot is near: 10 minutes"
:: wait
ping -n %wait% >nul
:: stop the spooler
sc stop spooler
:: shutdown
shutdown -r -f -c "1 minute more" -t 60

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial

This is the most effective way to reboot without affecting your user base. We run a 24x7 citrix environment and this works great. Just be sure that none of the servers you are running it on have any XML resolution responsibilities via DNS for instance ICA listed in DNS for custom ICA files would not know how to connect if your server logins were disabled.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.