Logo
programming4us
programming4us
programming4us
programming4us
Windows XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
 
Windows Vista

Exploring the Vista Task Scheduler

7/22/2013 5:53:47 PM

Event management includes close ties to system automation because you often need to generate automatic actions when specific events occur. For example, one of the most common tasks that is related to events is the automatic deletion of temporary files when disk drives get too full. Or in another scenario, you may require an automatic notification when unauthorized users try to log on to workstations that contain access to highly sensitive or confidential information.

In order to automate either notifications or tasks, you need to rely on the Task Scheduler. In Vista, the Task Scheduler has become much more of a real job scheduler. Like the Event Viewer and the Event Log system, the Task Scheduler has been completely rewritten and now offers several enhancements over the Task Scheduler found in previous versions of Windows. For one thing, the Task Scheduler now maintains a complete library of all scheduled tasks, all categorized according to source. In addition, like the Event Viewer, the Task Scheduler profits from a new interface based on the Microsoft Management Console (MMC) version 3.0 as shown in Figure 1.

Figure 1. The new Task Scheduler interface

As with all MMC version 3 interfaces, this one sports three panes — moving from left to right, the first is the Tree pane, the second is the Details pane and the third is the Action pane. As you can see, the main Task Scheduler details pane displays task summaries, task status, and active tasks, giving you ready access to any task information.

Tasks in Vista are based on two main components:

  • Launch conditions which can include up to three components:

    • Triggers which are the elements which actually start a task

    • Conditions which outline when and how the task can run

    • Settings which outline the options for a task

  • Actions which tell a task what to do

So far, this isn't very different than previous task automation features found in other versions of Windows, but Vista's Task Scheduler is a far cry from the Windows NT AT command. Previous versions of Windows had serious drawbacks when it came to system automation. In Vista, all of these situations have been corrected.

Vista now includes a whole series of new triggers — events; machine status such as idle, startup, logon, and so on; session state changes such as opening or closing of Terminal Services sessions, or lock or unlocking of sessions; or even the more conventional time-based task startups. Tasks can even use other tasks as triggers, letting you create new, conditional, or chained tasks and then, once the task has been initiated, have it repeat regularly or in other situations, add delays or other limits to a task. In addition, tasks can run on universal time so that global organizations can create tasks in one time zone and ensure they run properly in any time zone.

Each task can include more than one trigger ensuring the task will run if any of the launch elements occur. Along with triggers, tasks include conditions that determine how the task will behave as can be seen in Figure 2. Conditions control if the task should run while the system is idle, if the task should run while the system is on battery power, if the system should be booted up to run the task should it be turned off, or even if the system should be linked to a network for the task to run.

Settings control whether the task can be run manually, what should happen if the system was turned off when the task start time occurred, what to do if the task does not complete or fails or even runs too long. Settings can also apply rules to a task. These rules can include what to do if the start time occurs and an instance of the task is already running, or even delete the task once it has run.

Figure 2. Setting task conditions

Actions can be any number of items including running a program, sending an e-mail, or simply displaying a message. This makes the Task Scheduler very powerful indeed since you could automatically display a warning message to users whenever they try to access protected areas of their system. This makes a strong case for running locked-down systems, and the Task Scheduler gives you the tools you need to make sure the systems stay locked down and users curb their habits.

Of course, actions can also be more traditional and actually run programs. This is after all what the Task Scheduler was originally designed to do. And sending messages is also quite useful because administrators can receive notifications when tasks occur. For example, if you want to make sure that a critical task was performed on a system, then create a conditional task that sends an e-mail after the other task completes. Doing this saves you from having to verify task logs after the task was scheduled to run.

Vista even hides tasks and otherwise controls which credentials should be used when a task is run. In most cases, credentials are not stored in the task so you can change account passwords centrally without having to worry about all tasks failing. In some scenarios, though, credentials are stored in the secure Credential Manager store. In these cases, you still need to modify passwords locally but not in the task.

You can also use the Task Scheduler to create tasks either for Vista systems or for down-level versions of Windows. Tasks can be exported in XML format and reimported to any other system. This makes it very easy to generate tasks on one system and ensure that they run on all the systems in organizations of all sizes.

Finally, each task includes a history of operation, listing all of the events that indicate when the task was run and for how long. This feature makes monitoring tasks and making sure they run when expected very easy.

Tasks can be created in one of three ways. The first lets you create a basic task and runs you through a wizard that takes you through each step required to build the task. Advanced tasks are created by using the Create Task command that can be found either in the Context menu or in the Action pane. Create Task opens the Task dialog box and gives you access to each of the elements that make up a task. Finally, you can create and manage tasks through the command line through an updated "schtasks.exe" command. This command lets you script operations, such as importing tasks on different systems.

Overall, the Task Scheduler is a much more powerful engine for task management and automation on Vista, and when it is linked to the Event Log, Task Scheduler becomes a very strong engine for proactive systems management.

Other -----------------
- Tracking Change in Vista : Turning on the audit policy, Exploring the Vista Event Log
- Managing Change through Group Policy (part 4) - Assigning PC-Related GPOs, Troubleshooting and monitoring Group Policy
- Managing Change through Group Policy (part 3) - Working with GPO tools
- Managing Change through Group Policy (part 2) - Working with central policies
- Managing Change through Group Policy (part 1) - Working with Local Policies
- Securing the Workstation : Applying the Castle Defense System (part 7) - Working with external access - Working with Public Key Infrastructures, Working with Virtual Private Network connections
- Securing the Workstation : Applying the Castle Defense System (part 6) - Working with external access - Working with the Windows Firewall with Advanced Security
- Securing the Workstation : Applying the Castle Defense System (part 5) - Managing information access
- Securing the Workstation : Applying the Castle Defense System (part 4) - Hardening the system - USB Device Control, Windows Defender
- Securing the Workstation : Applying the Castle Defense System (part 3) - Hardening the system - User Account Control
 
 
Video tutorials
- How To Install Windows 8

- How To Install Windows Server 2012

- How To Install Windows Server 2012 On VirtualBox

- How To Disable Windows 8 Metro UI

- How To Install Windows Store Apps From Windows 8 Classic Desktop

- How To Disable Windows Update in Windows 8

- How To Disable Windows 8 Metro UI

- How To Add Widgets To Windows 8 Lock Screen

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010
programming4us programming4us
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 windows Phone 7 windows Phone 8
programming4us programming4us
 
Popular keywords
HOW TO Swimlane in Visio Visio sort key Pen and Touch Creating groups in Windows Server Raid in Windows Server Exchange 2010 maintenance Exchange server mail enabled groups Debugging Tools Collaborating
programming4us programming4us
 
programming4us
Women
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone