Have you ever fell into this situation “There’s an ongoing download and you would most probably need to stay awake until the download gets completed so that you can turn your system off before you go to bed”. How cool it would be if your computer turns off automatically for you when you want it to be ? Without your knowledge there’s already a tool installed on your system to schedule such kind of tasks in favor of you. This task scheduler comes with Windows-7 and Windows-8 which can perform many operations like sending an E-mail for you at a given time, Opening an application automatically, etc. Let’s get into the steps of making this useful tool provided by Microsoft.
Schedule Tasks like Sleep,Shut down and Auto E-mail in Windows 7/8 :
The main concept of using schedule applications is to perform a action which is set by the user (that is you). There are other options that can set along with task scheduler which you will learn from this article.
First Task : Scheduling Sleep in Windows 7/8
What you need is a task scheduler( pre-installed) and a small script which i’m going to give you. Follow the simple steps given below :
First copy the script below and open a notepad using “Windows key + r” and type in “Notepad“.
Rundll32.exe Powrprof.dll,SetSuspendState Sleep
Paste the code in notepad and save it a “Sleep.bat” on your desktop. Here bat refers to a batch file which can execute similar to an exe file and if you want to check the file if it’s working or not double click on it (No, stop i was just kidding ! The script will work fine). Now :
- Open task scheduler by searching from windows. To do so press “Windows key” and start typing “Schedule” and click on schedule tasks.
- Click on the “Create Basic Task” from the options on the right side.
- Give it a “Name” and some “Description” so that you can remember what task is being set and click on the next button.
- If you want your computer to sleep only once then select “One time” else select your convenient options and click on next.
- Set the date and time on which the sleep task has to be performed. Click on the small arrow next to the calendar so that the cute calender appears in front of you and when it’s done move to the next page.
- Choose the option “Start a program” because you will be selecting the batch file that was downloaded earlier.
- Browse and select the “Sleep.bat” file and click on next.
- Click on the finish button and then it’s all done. Your system will turn off automatically at the time you have mentioned.
Small Tip : Let’s say if you own a laptop and wish to put it to sleep within an hour or so , you can do this in a simple way. Set the sleep time of your computer from the power options as 1 hour when it is idle or even you can unplug the charge and set the sleep time of your computer from the power options to 1 hour when running on battery.
Second Task : Scheduling Shut Down in Windows 7/8
To schedule shutdown what you need is a shortcut application (We will make this now) and the task scheduler (In-built).
- Right click on your desktop and then select new => shortcut. Give shutdown.exe /s /t 00 as the location and click on next to continue.
- Give it a name as shutdown, hangover or whatever and save the file.
- Now follow the steps mentioned in the first task above. All the steps are one and the same except the 7th step where you will be selecting the shortcut file instead of the batch file.
You can also follow the above tip which i have provided in the first method. Bonus tips : use this command shutdown.exe /r /t 00 to restart your computer and use shutdown.exe /h to put your computer in hibernate mode.
Third Task : Scheduling an E-mail in Windows 7/8
There’s an default task in the task scheduler to schedule an e-mail automatically at a defined time but it doesn’t always works as promised. So i will tell you the other method using which you can schedule an e-mail.
What you need for scheduling an e-mail is SendEmail
. Download then extract it and keep it on your desktop for easy convenience. Now carefully follow till the step 6 mentioned in the first method
and continue the remaining steps as given below.
- Select browse and choose “SendEmail.exe” file.
- Now what you need to do is to add few arguments in the “Add arguments” box.
- For example if you are going to send an email to email@example.com then you’d use the following argument.-f firstname.lastname@example.org -t email@example.com -u YourSubject -m This is the body text! -s smtp.gmail.com:587 -xu yourusername -xp yourpassword -o tls=yes
and click on next.
- Don’t panic let me break it for you.-f =>Syntax for from option and firstname.lastname@example.org => This is the sender’s e-mail ID.
-t =>Syntax for to option and email@example.com => This is the receiver’s e-mail ID.
-u => Syntax for subject and YourSubject => This is your subject.
-m => Syntax for Message and This is the body text! => Your actual message to be sent.
-s => Defines the server and smtp.gmail.com:587 => This is the server for Gmail.
-xu => Your username and yourusername => Type your username.
-xp => Your password and yourpassword => Type your password.
-o tls=yes => Encryption.
- Click on the finish button and now your e-mail is ready to be sent.
If you have any issues regarding this article or if you face any difficulties to follow the above mentioned methods to schedule tasks in windows 7/8 please leave us your comment in the below section.If you like this article then kindly share it with your friends.