Using Windows Task Scheduler – CompTIA A+ 220-802: 1.4

The Windows Task Scheduler allows you to run applications and scripts at predefined times. In this video, you’ll learn how to start and configure Task Scheduler to automatically launch your custom tasks.
<< Previous Video: Windows System ConfigurationNext: Understanding Windows Component Services >>

Like any operating system, it would be nice if Windows could perform some tasks at a certain time of day automatically. You wouldn’t have to be there starting up any command line services, you wouldn’t have to run any particular tasks manually. You can simply tell Windows to perform whatever task you like at any particular time of day or day of week. This works inside of Windows XP, Windows Vista and Windows 7.

And inside of Vista and 7, you’ll notice there are even some predefined schedules that are already inside of the operating system, which makes it very easy to simply find what you like to run automatically. You click it and then you schedule it, and then you’re done. They are also folders that you can use to help organize these particular scheduled tasks inside of Windows Vista and Windows 7. So that you can collect and organize exactly what happens when.

In Windows XP, this is called schedule tasks. And you’ll find it inside of the control panel and Windows Vista and Windows 7, it’s in the Administrative Tools. So you’ll go to control panel, Administrative Tools, and you’ll run task scheduler from there.

Let’s see what options we might have to schedule some tasks in our Windows 7 desktop. I’m going to click the Start menu and go to Control Panel. And we know that the task scheduler is in Administrative Tools. And here’s the icon for Task Scheduler.

You can see the scheduler is set up with the same Microsoft management console field, so you have some things that you can select on the left side of the screen. You have options in the center that are based on what you’ve selected. And on the right side are actions that you can have.

Now you can see in my system that I have tasks that had been configured and active tasks that are running that are just built into Windows 7. You may not even know that it’s running these, but these are the defaults that come with the operating system. You can look at these tasks or you could even create your own basic task.

You would then define the task, maybe we would like to perform a system back up occasionally. You can even choose when you would like that to occur, would you like to be every day, maybe when the computer starts up, or maybe once I log in. Perhaps we’d run this every day. And we would like to run it perhaps at 3 o’clock in the morning.

We can set our timing of exactly how we would like these to occur. We can even have it synchronized across different time zones, if you have a lot of different computers that are located different places around the world. And you can set how many days you would like this to occur.

You could then choose the action. So maybe we would like to start a program, maybe we would like our system to send an email, or even display a message on the screen. Well my backup might be a script that I create. I would simply put the script information here, add any arguments, and you can even choose which folder this application is going to start in. And that’s it, you’ve now created a task. And you have that task that is loaded into the scheduler just waiting for that time frame to occur.

There are a number of built in tasks in Windows as well. Here’s the task scheduler library. And you can see under the Microsoft folder, there is a Windows folder. And you’ve got a lot of different options available.

If I go to defrag for instance, you can see that there’s already one that is scheduled and set up inside of this that says, at 1 o’clock every Wednesday of every week, they would like to run this process, and perform a defragmentation. It even tells you the last time it was run and whether the operation was completed successfully. And all of those things that we set up for this task are also included down here at the bottom. This is going to run as a particular user, here’s the triggers of when they start, here’s the action that occurs. It runs the defrag.exe program, the conditions that must be associated with that.

Maybe you don’t want this task to run if the computers busy doing something else. Maybe you want it to wait until the computer is idle for a certain amount of time and only then will you run the program. There’s different settings to choose how the application will run. And we’ve disabled history on this particular event, but you could set up task scheduler to keep track of how this is run over the period of time that you have set.

You also have the option within these folders to build out your own task scheduler library itself. I can create a new folder that’s just for me and now I can add whatever tasks that I would like to put inside of it. And build out my own structure, so that I can organize and keep track of exactly what I’ve configured to run, and when those things would be running. So as you can see, task scheduler gives you a lot of options. You now have a lot of control on how you would automatically run these applications on your computer.