[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

how to create a reboot server command as a schedlued task?

Posted on 2005-05-11
3
Medium Priority
?
223 Views
Last Modified: 2010-04-14
Hello,

Id like to create a scheduled task thats reboots a server every night at 4am. I want to use a scheduled task does anyone know exactly how to do this?

thanks,
0
Comment
Question by:acetate
  • 2
3 Comments
 
LVL 32

Accepted Solution

by:
r-k earned 2000 total points
ID: 13983883
Yes, proceed as follows:

(1) On any XP system, find the program named shutdown.exe. Normally it is in c:\windows\system32. Copy this program to any folder on your Win2000 system, say in c:\scripts

(2) In that same folder (c:\scripts) create a .bat file with just two lines within it:

   cmd /c "c:\scripts\shutdown.exe -r"
   exit

 (that -r is important, else the machine will shut down but not reboot)
 Give your batch file a name, e.g. reboot.bat

(3) Schedule it to run every day at 4:00 AM as follows:
     (from a command window)

 > AT 04:00 /every:M,T,W,Th,F,S,Su c:\scripts\reboot.bat

 >AT    

  (just to make sure it is scheduled)

That should do it.
0
 

Author Comment

by:acetate
ID: 13992257
cheers r-k ! thats look good to me! your a champ!
0
 
LVL 32

Expert Comment

by:r-k
ID: 13993164
Thanks :)

Do try in daylight hours first just to be sure, before letting it loose at 4:00 AM.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Tech giants such as Amazon and Google have sold Alexa and Echo to such an extent that they have become household names. And soon they are expected to be used by commoners in their homes, ordering takeout, picking out a song, answering trivia questio…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Screencast - Getting to Know the Pipeline
Suggested Courses

826 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question