Run the cmd command to shut down or restart the computer.

Source: Internet
Author: User

Dos cmd restart 2003 command shutdown-r-t 0

Run the cmd command to shut down or restart the computer. At/every: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday shutdown/r/t 0 automatically restarts the server command at every day. Shutdown-r-t 0: you can write the preceding statement in notepad and save it as reboot. cmd. The extension is cmd. Do not forget that the content comes from qishi technology.

Run the cmd command to shut down or restart the computer.Content from qishi Technology

At/every: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday shutdown/r/t 0 automatically restarts the server command at every day.Zero Technology

Shutdown-r-t 0Content from qishi Technology

You can write the preceding statement in notepad and save it as reboot. cmd. Do not forget the extension cmd.
R indicates that the time unit for restarting t is second 0, that is, 0 seconds.
If you change r to s, it will shut down, in this way, you can set the automatic shutdown time to see how many seconds you want to set the automatic shutdown time for a certain period of time or to cancel the restart, you only need to run shutdown-a and you can copy right www.00isp.com.

First, let's talk about the shutdown command that comes with the system. A lot of people should already know about it, that is, shutdown. The parameters will be listed if there is no parameter execution. Common parameters are:
/S shut down the computer
/R Disable and restart the computer
/F force the running application to close without warning the user beforehand
/T xxx sets the timeout before closing to xxx seconds.
Valid range: 0-600; default value: 30
In addition, you can enter shutdown/a during the countdown process to cancel shutdown or restart. If the/t parameter is not added, the countdown is 30 seconds. Copyright www.00isp.com

If you need to shut down immediately, you can write it as follows: (replace the/s parameter with the/r parameter to restart immediately)
Shutdown/f/s/t 0Content from www.00isp.com

Shutdown supports operations on remote computers. The/m parameter is required, for example:
Shutdown/f/s/m \\\\ test
After 30 seconds, force the computer named test in the LAN to disable copyright www.00isp.com

In addition, the at command aims to run commands and programs on the computer at the specified time and date. Enter at/? In the command line /? The help information is listed. The Help and Support Center provides more detailed explanations and examples. Technical support provided by qishi Technology

If you want to automatically shut down at, you can write this:
At 23:30 shutdown/f/s/t 0
If the job is successful, a message similar to this will be returned: a new job is added, and its job ID = 1 is from www.00isp.com.

If you want to cancel the Timed Shutdown, either of the two methods comes from the zero point technology.

Method 1: Command Line
If at is executed without any parameters, the set content is listed and the status ID is recorded. For example, if this example is 1, enter:
At 1/delete
It can also be abbreviated:
At 1/d
Without the serial number, the/d parameter will delete all set content. If you want to delete all set content without confirmation, you can: at/d/y copyright www.00isp.com

Method 2: Task Plan
The scheduled execution command set by the at command can be seen in the "Task Plan" on the "control panel". Delete the command if you want to cancel it.Technical support provided by qishi Technology

If you only need to use the Command temporarily, for example, to automatically shut down the instance on a scheduled basis on the same day, use the command above. If you want to execute the task on a certain day or every Monday or even every day in a month, you need to add some parameters and give examples.Content from www.00isp.com

Example 1: automatic shutdown at on the first, fifth, tenth, 15th, and 20th of each month
At/every:, 20 shutdown/f/s/t 0Zero Technology

Example 2: automatic shutdown at every Monday
At 23:00/every: Monday shutdown/f/s/t 0Content from qishi Technology

Example 3: automatic shutdown at every day
At 22:00/every: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday shutdown/f/s/t 0Technical support provided by qishi Technology

That is, the every parameter is used. The daily automatic shutdown in Example 3 can be abbreviated:
At/every: Su, M, T, W, Th, F, Sa shutdown/f/s/t 0 content from www.00isp.com

Finally, Let's explain that this command applies to XP/2003, while Windows 2000 does not contain the shutdown command (of course, copying a previous command from XP/2003 can also be used ), windows 2000 is not installed on my machine. I don't know if the at command is included in 2000. Content from www.00isp.com

In addition, the "at" command is used instead of the "at" command in the task plan because the task added with the "at" command is executed with the highest SYSTEM permission. It will take effect if you do not log on to the "at" command, the tasks added in the task plan need to specify the Administrator account and password to take effect without logon, the at command can also use \ computername to specify other computers in the LAN to create an automatic task plan. Of course, the prerequisite is that you have the Administrator account and password of the other machine. Zero Technology

Add two points:
1. When the above commands are used and executed, the system enters the countdown to shutdown. At this time, if you are at work and do not shut down, you can immediately set the time to run shutdown.exe-a "to stop the shutdown command. You can also create a shortcut for this command on the desktop for ease of use.
2. The AT command from beibeishutdown.exe to 2000 can be used completely, including Win2000 and Win2000Server. Technical support provided by qishi Technology

It is very convenient to use at with the shutdown command.
For example, you can use at shutdown-s-fContent from qishi Technology

Appendix ShutDown usage and Parameters
Usage: shutdown [-I |-l |-s |-r |-a] [-f] [-m \ computername] [-t xx] [-c "comment"] [-d up: xx: yy]
No parameter to display this message (? Same)
-I: displays the GUI, which must be the first option.
-L logout (cannot be used with option-m)
-S: disable this computer
-R: Disable and restart this computer
-A discard system shutdown
-M \ computername: Remote Computer shutdown/restart/discard
-T xx: Set the timeout value to xx seconds.
-C "comment" Close comments (127 characters at most)
-F: the application that is forced to run is disabled without warning.
-D [p]: xx: The cause code of yy's shutdown
U is the user code
P is the code to close a plan.
Xx is a major cause code (a positive integer smaller than 256)
Yy is a secondary cause code (a positive integer smaller than 65536)
-F: forcibly close the application
-M \ computer name: controls remote computers
-I: displays the graphic user interface, but must be the first option of Shutdown.
-L: log out of the current user.
-R: Shut down and restart
-T time: Set shutdown countdown
-C "message content": Enter the message content in the shutdown dialog box (cannot exceed 127 characters)

2. Example:
Shut down the computer shutdown-s (method: "Start"-> "run"-> "shutdown-s"-> "OK ")
Shutdown-s-t 3 (method: "Start"-> "run"-> "shutdown-s-t 3"-> "OK ")
Cancel shutdown-a (method: "Start"-> "run"-> "shutdown-a"-> "OK ")Technical support provided by qishi Technology

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.