I have a laptop back home with Windows Vista installed.
I want my computer to fall asleep automatically at 01:30 AM and wake up at 06:30 AM.
I have tried a lot, but making a .bat file which makes it fall asleep needs to be manually activated. How can I do it automatically?
Answer
For Statup, there should be a setting in the BIOS, but without more details can't really help.
- You'll need a batch file, scheduled to run at 1:30am. Copy and paste this into a txt file, save it to a location where it won't get deleted (C:\Windows) as die.bat (NOT die.bat.txt)
shutdown /s /f /t 20
This shuts the computer down (/s), forces any process to end (/f) with a 20 seconds timeout (/t 20). To make it sleep/hibernate, use the /h flag instead of the /s one.
Next, click on start and find Task Schedular. (All Programs, Accessories, Systems Tools, Task Scheduler).
On the right-hand pane, click "Create Basic Task"

Give the task a name and description (example "Shutdown").
Choose when you want to task to run (example "Daily")
Choose what time you want to the task to run (example "01:30:00), recur ever 1 days)
Choose "Start a Program"
Browse to the location of the .bat file.
Click Next, Click Finish.
To test, save all your work, right-click, and "Run Now".
No comments:
Post a Comment