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

Posted on 2005-05-11
Last Modified: 2010-04-14

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?

Question by:acetate
    LVL 32

    Accepted Solution

    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"

     (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


      (just to make sure it is scheduled)

    That should do it.

    Author Comment

    cheers r-k ! thats look good to me! your a champ!
    LVL 32

    Expert Comment

    Thanks :)

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    This post first appeared at Oracleinaction  ( Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
    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…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now