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

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,
acetateAsked:
Who is Participating?
 
r-kConnect With a Mentor Commented:
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
 
acetateAuthor Commented:
cheers r-k ! thats look good to me! your a champ!
0
 
r-kCommented:
Thanks :)

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

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.