Pages

Saturday, March 19, 2011

Scheduling tasks in Windows 7

While working with your computer, no doubt that you wish you could schedule running some application or make the computer do a specific job without you have to stay at computer for hours. For me, I want to shut down the computer automatically at a scheduled time, so that I can sleep without waiting till the computer finish the job. Or if I want computer to remind me something, I wish if there's a way to  schedule a notification.

in Windows 7 you can do those tasks by “Scheduled Tasks”. To locate the scheduled tasks; click ‘Start’ –> Control Panel –> Administrative Tools –> Task Scheduler. You’ll get a similar screen like the below image.


OK. So I need my computer to remind me about the exam I’m preparing for, every time when I log in to the computer. Otherwise I may forget it and may lost in the cyberspace doing something else. To do that, click on the “Create basic Task..” which will direct you to the following window.



Now it’s a simple procedure. Fill the details click ‘next’. Set the trigger, here I want to run this task whenever I log in to the machine. So I choose the option ‘When I log on’. Click ‘Next’. Set the action in the next step. I want to display a message, so I choose the “Display message” option.




Set the message content as I have done :). Then click ‘next’. Check whether your settings are correct and then click ‘Finish’. Done ! Now you task should be visible in the “Active Tasks” list. (See the image below)

Here is our task is in action !



Scheduled Shutdown


When I want to shut down the computer on a predefined time, I create a task for it. To do that, create a basic task and set the time you want the trigger to run from ‘Trigger’ option (just as we selected the ‘when I log on’ last time)



In the “Action” option, choose start a program (instead of the ‘Display message last time’). Then choose the shutdown.exe as the program which needs to run. (C:\Windows\System32\shutdown.exe). Make sure you set the optional parameter ‘/s’ (as in the image below) which is for telling the shutdown.exe to actually shutdown.
There are other parameters also. Like ‘/r’ for restarting the machine, ‘/t xxx’ for set the time-out period before shutting down (xxx is the time in seconds). To view the full list of options, type “shutdown.exe ?” in your command  prompt and hit enter.

1 comment:

  1. I recommend taking a look at VisualCron for more advanced scheduling and automation. http://www.visualcron.com

    ReplyDelete

Had to enable word verification due to number of spam comments received. Sorry for the inconvenience caused.