[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2105
  • Last Modified:

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.
5 Solutions
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 http://www.wmsoftware.com/products.aspx.  They have some pretty good products I have used in the past including a reboot scheduler.
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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


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.

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now