Computer timed sleep

Source: Internet
Author: User

Before going to bed at night, I want to listen to 20 minutes of songs and sleep in the song. If I turn off my computer at a certain time, it will take a lot of time to start the computer. If I want to sleep at a regular time, I do not need to start my sleep manually.

 

If you are familiar with the doscommand, you can use the AT command to add a job. For how to use the AT command, enter /? For more information, see.

Tip: You must start the system plan service.

Because the AT command parameter is "Windows NT command to be run or batch processingProgram", I went into the test and found that the command with parameters could not be run.

The doscommand for System sleep is rundll32.exe powrprof. dll and setsuspendstate.

Run the following command: AT/interactive "rundll32.exe powrprof. dll, setsuspendstate", and the file cannot be found in the system event.

The initial estimation is about the command parameter.

Solution: Create a batch processing file (C: \ sleep. BAT) with the content "rundll32.exe powrprof. dll, setsuspendstate"

Create a batch file (timed sleep. BAT) for adding jobs. The time when the file receives user input, in the format of "", the content is as follows:

@ Echo off

Set/P = enter the system sleep time ):

At % P %/interactive "C: \ sleep. Bat"

@ Echo on

Put "timed sleep. Bat" in a convenient location. When necessary, double-click it and enter the time to sleep: hour: minute format.

 

 

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.