All tasks created with the Scheduled Task Wizard appear in the Scheduled Task folder that you can access using the Start All Programs Accessories System Tools Scheduled Tasks menu or by selecting the Scheduled Tasks option in the Control Panel.
Physically, all tasks are saved into the C:/Windows/Tasks folder with the .job extension.
If you look at the Scheduled Tasks folder with the Details option from the Views menu, the columns show the Schedule, Next Run Time, Last Run Time, Status, Last Result, and Creator, as shown in Figure 39.7.
Figure 39.7: The Details view shows the last time the task was run and the next time it will run.
The Status field is left blank if the scheduled tasks run correctly. The Status displays Running when the task is currently being executed, Missed if the task was skipped because the computer was off, and Could Not Run if the task failed for some reason.
The Scheduled Tasks folder also contains an Advanced menu that includes several commands that apply globally to all tasks within the folder. The Advanced Stop Using Task Scheduler suspends all scheduled tasks. You can restart the tasks with the Advanced Start Using Task Scheduler menu command. An alternative to stopping the scheduled tasks is to use the Advanced Pause Task Scheduler command, which pauses all tasks until the Advanced Continue Task Scheduler menu is selected.
If you select an individual scheduled task from the Scheduled Tasks folder, you can right-click and select the Run command to immediately execute the selected task. If the task is already running, then the End Task option is available and can be used to stop the current task.
The right-click pop-up menu also includes a Delete command to permanently remove the selected task. Tasks can be deleted only if they are currently not running.
The Advanced menu includes a toggle option to Notify Me of Missed Tasks. If your computer is turned off when a task is scheduled to run, enabling this option causes a dialog box to appear the next time Windows starts, informing you that a scheduled task was missed.
Every time a scheduled task is created, executed, or tries to run, an entry is made into a log. You can view the log using the Advanced View Log command. This log is a simple text file with the most recent entries added to the bottom. This log file is helpful to determine any problems that have occurred with the scheduled tasks.
Some programs such as virus scanners automatically create a scheduled task as part of their installation. Sometimes these installations create tasks that are hidden, but you can view any hidden tasks in the Scheduled Tasks folder using the Advanced View Hidden Tasks menu command.
Selecting the Properties menu command from the right-click pop-up menu opens the Properties dialog box with three tabs. The Task tab, shown in Figure 39.8, includes a Run line that works exactly like the Start Run dialog box. If you click the Browse button, you can change the program or document executed when the task is run.
Figure 39.8: The Task tab of a task's Properties dialog box lets you change the program and log in info.
The Run field can also include command-line parameters that are used to configure how the application runs. I cover using these parameters later in this chapter.
The Start in field lets you specify where the program runs, and can be a different folder if you've selected to open a document. For example, if you select to run a Word document, you want to set the Start in directory to be the location of the Word application.
The Comments section lets you enter some notes to help identify the goal of the task. You can also select the user that runs this task.
The Run only if logged on option keeps scheduled tasks from running if another user is logged into the computer. The Enabled option provides another way to disable the task without deleting it.
The Schedule tab, shown in Figure 39.9, includes settings for specifying the time and date for the task. The options are the same as those found in the wizard: Daily, Weekly, Monthly, Once, At system startup, and At logon. For each option, you can set the Start time and date.
Figure 39.9: The Schedule tab of a task's Properties dialog box lets you set the task's time and date.
Along with the schedule options in the Schedule tab is a When Idle option. This option lets you run the scheduled task after the computer has been idle for a specified amount of time. This option is great for running small tasks, such as logging out, when you leave the computer idle for lunch or a break.
The Show multiple schedules option at the bottom of the Schedule tab adds a drop-down list along with New and Delete buttons at the top of the tab, as shown in Figure 39.10. New schedules are added to the list using the New button, and the selected schedule can be deleted with the Delete button. Using this option you can schedule a task to run nightly and also to run when the computer is idle.
Figure 39.10: The Schedule tab lets you include multiple schedules for the selected task.
When a new task is created, you're limited to executing a task only once in a day; but using the Advanced Schedule Options dialog box, shown in Figure 39.11, opened using the Advanced button in the Schedule tab, you can set a task to repeat throughout the day or until a specified time or Duration value is reached. For example, if you receive notification that a particular virus threat will show up on a certain day, then you could enable a task to check for viruses to repeat throughout the day instead of the weekly or daily check.
Figure 39.11: The Advanced Schedule Options dialog box lets you set a task to repeat throughout the day.
The Settings tab of the Properties dialog box for the task, shown in Figure 39.12, includes options for controlling how the task is run. The options include the following:
Delete the task if it is not scheduled to run again. This permanently deletes the task after it is run for the last time.
Stop the task if it runs for a specified length of time. This option can keep schedule tasks from running longer than they should. Be careful not to set this value lower than the time it takes for the task to complete.
Only start the task if the computer has been idle for at least. This option keeps scheduled tasks from running if you are using the computer during the scheduled time.
Stop the task if the computer ceases to be idle. This option suspends the task if you start using the computer while a task is running.
Don't start the task if the computer is running on batteries. This option is intended for laptops that aren't connected to an outlet. It keeps tasks from running down a battery completing tasks that can be completed at another time.
Stop the task if battery mode begins. If a task is running when the laptop is disconnected from an outlet, this option stops the task, saving battery power.
Wake the computer to run this task. Most tasks can run in the background without waking the computer, but if you want the computer to wake up to show you the task it is working on, then this option can be used.
Figure 39.12: The Settings tab of a task's Properties dialog box lets you set how the task is run.
If you've created a large number of scheduled tasks that run throughout the day and week, then stopping all of them from running can be done with the Advanced Stop Using Task Scheduler, but this might cause problems if some tasks are running. Another option is to use the Administrative Tool in the Control Panel to suspend the Task Scheduler service.
To suspend the Task Scheduler service and stop all scheduled tasks as once, follow these steps:
Select the Start Control Panel menu command to open the Control Panel.
Double-click the Administrative Tool icon to launch it.
Within the Administrative Tools folder, double-click the Services icon. This opens a tab showing all the active services that are currently running, shown in Figure 39.13.
Figure 39.13: The Services tab of the Administrative Tools folder lets you start and stop running services.
Right-click the Task Scheduler service and select the All Tasks Stop menu option. This stops all scheduled tasks from running. You can also select to Pause or Restart the service.