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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rebooting machines that haven't been restarted for a long time

Status
Not open for further replies.

retto

Technical User
Oct 3, 2002
27
0
0
US
Does anyone know of a way to automatically restart Windows XP machines that have not been rebooted in a long time? I work with a large network of machines that are used 24/7, but some machines never get rebooted. I am thinking that running a script that is triggered by CPU time in the task manager might be a place to start, but I am really not sure how to tackle the problem. Anyone have any ideas?
 
If the machines are on a domain, you could set a group policy.

Alternatively a VB script that checks the time of last reboot and then reboots if its more than a specified amount.
Last Reboot:

Send Reboot command:

You can have it run say every day as a scheduled job.




----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Look up Wizmo and particularly the Reboot option.

Worked great for me on my old NT 4.0 servers - never a problem.
 
I should have added - download to c:\windows\system32 and create a scheduled task to do a "Wizmo.exe Reboot" at the time you need it.
 
What about using uptime.exe with a scheduled task?
 
Wizmo, wizmo, wizmo. Rah rah rah. I guess there are lots of ways to do it, but I verified this way in my server environment over a period of 2 years and no problems.
 
XP does include shutdown.exe. Create a batch file containing:

shutdown -r -f -t 30

and set it up as a scheduled task to force a restart after a 30 second warning to any user logged into the system.

Jock
 
We came up with a solution to the problem, and I thought I'd share it. In scheduled tasks we set the following batch file to run when the computer starts:

====================

Ping 127.0.0.1 /w 1000 /n 1209000
shutdown /r /f /t 600

====================

What happens is that the machine pings it's own loopback adapter for approximately 2 weeks, and then reboots the system (after a 30 second warning.) Since the counter is reset at every bootup, it satifies our needs without installing software. Thanks everyone for your suggestions, it definitely helped me research some options.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top