Method 1: Using cmd command
1
Open the cmd window.
Method 1: Click the Start button in the lower left corner of the desktop and enter "cmd" in the search box
Method 2: Use the shortcut key "Win R" to bring up the run dialog box and enter "cmd"
2
Enter "shutdown" in the cmd window to view the shutdown command usage and parameters
Among the more commonly used and important ones are the following:
shutdown parameters
-s: means shut down the computer
-r: means shut down and restart the computer
-t: indicates time in seconds (use -t 3600 for one hour)
-a: Indicates terminating system shutdown
3
If we shut down the machine after one hour of testing, we should enter: shutdown -s -t 3600
Note there are three spaces
4
After pressing Enter, the system will prompt a shutdown task reminder in the lower right corner
5
If you want to cancel the shutdown task, enter in the cmd window: shutdown -a
6
After canceling the task, the system will also prompt task cancellation information in the lower right corner of the desktop
END
Method 2: Use the scheduled task settings in Computer Management
Right-click "Computer"-->"Manage" option
On the computer management page, click "Task Scheduler" on the left and the "Create Basic Task" option on the right
Enter the first step of the wizard, fill in the name and description
The second step of the wizard, select once (you can choose different time periods according to personal needs)
Wizard 3, fill in the task time
Wizard 4, select "Start Program"
Guide 5, the key place!
Fill in the program or script: shutdown
Add parameters: -s -t 3600
(Note there are two spaces)
Then select "Finish".
9
Go back to the "Task Scheduler" page, view the active tasks, and you will see the newly created task event
Assuming that you need to perform automatic shutdown at 22:25 from Friday to Sunday and 23:55 on Saturday, you can make the following settings:
Open All Programs→Accessories→System Tools→Task Scheduler→Select "Create Task" in the action list
(Same goes for creating basic tasks).
1. Enter the name, description and other information in the "General" tab → check "Run with highest privileges" in the security options below.
2. Create two new triggers in the "Trigger" tab, and select "When making a plan" in "Start Task".
For the first trigger, select "Weekly" in the settings and check "Sunday to Friday" → "Start" text box input to turn off
Machine time 22:25:00 (the date does not need to be changed) → No need to check in "Advanced Settings"; similarly, the second trigger setting
is "23:55:00 every Sunday".
3. Create a new operation in the "Operation" tab → select "Start Program" → enter "shutdown" in the program or script box below
(i.e. shut down), enter "-s" (meaning local machine) in the parameter box.
4. Under normal circumstances, there is no need to make changes to the following three tabs, just use the system defaults.
After setting up, click "OK" all the way and you're done!
When the system performs the shutdown operation, it will prompt "Windows will shut down in one minute",
At this point the user has 30 seconds to save the data. Of course, if you suddenly change your mind and don’t want to shut down,
You can press "Win R" and run "shutdown -a", and then the system will prompt that the shutdown operation has been cancelled.
————————————————————
If you only use the scheduled shutdown occasionally, you can do this:
1. To shut down the computer on time at 23:00 in the evening, you can run the following command:
at 23:00 shutdown -s
2. Turn off the computer after 1 hour:
shutdown -f -s -t 3600 (the unit of 3600 is seconds)
3. shutdown -a can terminate the command
-f: Force close application
-m \\computer name: control remote computer
-i: Display the graphical user interface, but must be the first option of Shutdown
-l: Log out the current user
-r: Shut down and restart
-tTime: Set shutdown countdown
-c "Message content": Enter the message content in the shutdown dialog box (cannot exceed 127 characters)
Brother, please be detailed enough!
Click the "Start" menu, select "All Programs", select "Accessories", then select "System Tools", and finally select "Task Scheduler": or directly in the "Search Programs and Files" text box at the bottom of the Start menu Enter "scheduled task" in and press Enter, or you can open the task scheduler:
In the opened "Task Scheduler" window, click the "Create Basic Task..." command on the right to open the "Create Basic Task Wizard" window:
In the "Create Basic Task" step, in the "Name" text box, enter the name of the task plan, such as "Shutdown", and then click the "Next" button:
In the "Task Trigger" step, select the appropriate time and frequency. We select "Every Day" so that we can select a fixed installation time point in the subsequent steps, and then click the "Next" button:
Then, set the time point when you want to automatically shut down, and click the "Next" button:
In the next "Action" step, select the "Start Program" single option, and click the "Next" button:
In the "Program or Script" box, enter the "shutdown" command without making any mistakes.
Then you can enter the parameters you need in "Add Parameters". For example, if we enter "-s -t 60" (note the order), it will prompt a 1-minute countdown to shut down, and then click the "Next" button;
In the final window, the configuration content of this scheduled task is displayed. Click the "Finish" button after it is correct:
In the returned "Task Scheduler" window, we can see the automatic shutdown task we just created:
Then, when the specified time is reached, the shutdown task will be automatically executed, and a prompt will pop up 1 minute in advance (this prompt is because we just entered "-t 60" in the parameter):
Precautions
Shutdown parameters:
-s: indicates shutdown;
-r: indicates restart;
-t: represents time in seconds;
-a: Indicates canceling the shutdown plan, which means canceling the shutdown or restart command, but within the time when -t pops up;
Example: shutdown –r –t 120 means restarting the computer after 120 seconds
The above is the detailed content of How to set up an automatic shutdown schedule in Windows 7. For more information, please follow other related articles on the PHP Chinese website!