Running/ Creating a batch file to run Shutdown.exe command

Posted on 2006-05-16
Last Modified: 2008-02-07
I want to schedule 3 servers on my network to reboot every monday @ 130 am.  

shutdown \\computer1 /r at 13:30 /every:M

Is this syntax correct?  How can i store this in a batch file to be called every monday?

Thank you
Question by:QDS
    LVL 52

    Expert Comment

    use shutdown -r -f \\computer
    and put it into a batch. Let it be executed through scheduler at the appropriate times and use multiple schedules.
    It has to be executed through an account that has admin rights remotely.
    LVL 5

    Accepted Solution

    by: is link to read up on the correct syntax

    The easiest way to complete this is to create a .bat file and use the scheduled task to run the job automatically

    shutdown \\computer1 /r

    is the only text you need in the bat file.  

    to create a .bat file open notepad enter the command and save as weekly_reboot.bat

    Then schedule weekly_reboot.bat to run every monday at 1:30am

    Your 13:30 would reboot the server every monday in the middle of the day......


    Author Comment

    Thank you for your quick response.  This in on Win2k machines.  What is -f stand for?  Would my computer have be to be logged into, logged out and/ or locked to performed this??

    Author Comment

    Also what would happen in in this case if there happened to be a program running?  would these commands work?
    LVL 5

    Expert Comment

    /c and /y will take care of any programs running without stopping at any prompts.

    I am not sure what the -f mentioned above does.  I never have had to use that.  


    shutdown \\computername /r /c /y will take care of it...
    LVL 52

    Expert Comment

    They work no matter if locked or if no one is logged on.
    f forcces applications to shut down.

    But both of us forgot -m,  the correct syntax would be
    use shutdown -r -f -m \\computer
    LVL 2

    Expert Comment

    An alternative:   On each server set-up a scheduled task with this line:

    tsshutdn /reboot

    Task schduler = Start - Settings - Control Panel - Scheduled tasks.

    more details on tsshutdn at

    LVL 32

    Expert Comment

    I would recommend scheduling the bat file with the AT command, not the GUI interface of the Control Panel.

    See;en-us;313565&sd=tech for a description of the AT command.
    LVL 9

    Expert Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Suggested Solutions

    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…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    779 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

    18 Experts available now in Live!

    Get 1:1 Help Now