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

Maintaining Desktop Health : Using Task Scheduler (part 4) - Managing Tasks

- Windows 10 Product Activation Keys Free 2019
- How to active Windows 8 without product key
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
4/22/2013 5:45:10 PM

7. Managing Tasks

Task Scheduler simplifies task management and monitoring. This section explains how to view task history, export tasks, and import tasks.

Display Running Tasks

To display all tasks currently running on the system, open Task Scheduler and select Display All Running Tasks from the Action menu. This opens the All Running Tasks window, and you can click Refresh to manually refresh the display. You can also select one or more tasks and click End Task to stop tasks on demand.

Viewing History

The History tab of a task displays all the known events for that task and allows you to quickly see the last time the task ran and its status. Only events that relate to the currently selected task will be shown, eliminating the need to scour the Task Scheduler event log for individual events from specific tasks.

To view the history of a task, do the following:

1.
If Task Scheduler is not open, start Task Scheduler.

2.
Find and click the task folder in the console tree that contains the task you want to view.

3.
In the console window, click the task that you want to view.

4.
Click the History tab to view the task’s history. Click an event, in the list of events on the History tab, to view the description of the event.

Exporting Tasks

You can export tasks to an .xml file and then import them at some later time, on either the same computer or a different computer. This feature allows for easy portability of tasks from computer to computer.

To export a task, follow these steps:

1.
Right-click the task that you want to export and then select Export, or select Export in the Action pane.

2.
Browse to where you want to save the file, enter the name of the file, and then click Save.

3.
The task will be saved in .xml format. The following example shows a simple task.

<?xml version="1.0" encoding="UTF-16"?>                                           
										<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
										  <RegistrationInfo>                                                              
										    <Date>2006-04-11T13:54:51</Date>                                              
										    <Author>USER1-VISTA\user1</Author>                                            
										    <Description>Test Task</Description>                                          
										  </RegistrationInfo>                                                             
										  <Triggers>                                                                      
										    <TimeTrigger id="1a08ebe4-0527-4e7a-af76-84f2ef1dbfa0">                       
										      <StartBoundary>2006-04-11T13:55:23</StartBoundary>                          
										      <Enabled>true</Enabled>                                                     
										    </TimeTrigger>                                                                
										  </Triggers>                                                                     
										  <Principals>                                                                    
										    <Principal id="Author">                                                       
										      <UserId>USER1-VISTA\user1</UserId>                                          
										      <LogonType>InteractiveToken</LogonType>                                     
										      <RunLevel>LeastPrivilege</RunLevel>                                         
										    </Principal>                                                                  
										  </Principals>                                                                   
										  <Settings>                                                                      
										    <IdleSettings>                                                                
										      <Duration>PT10M</Duration>                                                  
										      <WaitTimeout>PT1H</WaitTimeout>                                             
										      <StopOnIdleEnd>true</StopOnIdleEnd>                                         
										      <RestartOnIdle>false</RestartOnIdle>                                        
										    </IdleSettings>                                                               
										    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>                  
										    <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>                 
										    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>                         
										    <AllowHardTerminate>true</AllowHardTerminate>                                 
										    <StartWhenAvailable>false</StartWhenAvailable>                                
										    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>                  
										    <AllowStartOnDemand>true</AllowStartOnDemand>                                 
										    <Enabled>true</Enabled>                                                       
										    <Hidden>false</Hidden>                                                        
										    <RunOnlyIfIdle>false</RunOnlyIfIdle>                                          
										    <WakeToRun>false</WakeToRun>                                                  
										    <Priority>7</Priority>                                                        
										  </Settings>                                                                     
										  <Actions Context="Author">                                                      
										    <Exec>                                                                        
										      <Command>C:\Windows\System32\calc.exe</Command>                             
										    </Exec>                                                                       
										  </Actions>                                                                      
										</Task>                                                                           
									

					  

Importing Tasks

Tasks that have been exported can also be easily imported to another computer or the same computer.

To import a task, follow these steps:

1.
Right-click a task folder under the Task Scheduler Library and select then Import Task, or select Import Task in the Action pane.

2.
Browse to where the .xml file is located and click Open. The task will be automatically imported into the library using the settings contained in the .xml file.

Note

To ensure that the task runs properly, it is recommended that you verify the properties of the task after you import it.


Using the SchTasks.exe Command

This section describes the SchTasks.exe command-line syntax and parameters. The Schtasks.exe command-line interface utility allows an administrator to create, delete, query, change, run, and end scheduled tasks on a local or remote system through the command shell.

Command Syntax

The SchTasks.exe command interface uses the following syntax:

schtasks /<parameter> [arguments]
							

Command Parameters
  • /Create Creates a new scheduled task

  • /Delete Deletes the scheduled task(s)

  • /Query Displays all scheduled tasks

  • /Change Changes the properties of scheduled task

  • /Run Runs the scheduled task immediately

  • /End Stops the currently running scheduled task

  • /? Displays this help message

Creating Tasks

The general syntax for Schtasks.exe is as follows:

SCHTASKS /Create [/S system [/U <username> [/P [<password>]]]] [/RU <username> [/RP <password]] /SC schedule [/MO <modifier>] [/D <day>] [/M <months>] [/I <idletime>] /TN <taskname> /TR <taskrun> [/ST <starttime>] [/RI <interval>] [ {/ET <endtime> | /DU <duration>} [/K] [/XML <xmlfile>] [/V1]] [/SD <startdate>] [/ED <enddate>] [/IT] [/Z] [/F]

Example command:

SCHTASKS /Create /S system /U user /P password /RU runasuser /RP runaspassword
								/SC HOURLY /TN rtest1 /TR notepad                                             
							

					  

Deleting Tasks

Syntax:

SCHTASKS /Delete [/S <system> [/U <username> [/P [<password>]]]] /TN <taskname> [/F]

Example command:

SCHTASKS /Delete /TN "Backup and Restore"
							

Running Tasks

Syntax:

SCHTASKS /Run [/S <system> [/U <username> [/P [<password>]]]] /TN <taskname>

Example command:

SCHTASKS /Run /TN "Start Backup"
							

Ending Tasks

Syntax:

SCHTASKS /End [/S <system> [/U <username> [/P [<password>]]]] /TN <taskname>

Example command:

SCHTASKS /End /TN "Start Backup"
							

Querying Tasks

Syntax:

SCHTASKS /Query [/S <system> [/U <username> [/P [<password>]]]] [/FO <format>] [/NH] [/V] [/?]

Example commands:

SCHTASKS /Query /S system /U user /P password
								SCHTASKS /Query /FO LIST /V                  
							

Changing Tasks

Syntax:

SCHTASKS /Change [/S <system> [/U <username> [/P [<password>]]]] /TN <taskname> { [/RU <runasuser>] [/RP <runaspassword>] [/TR <taskrun>] [/ST <starttime>] [/RI <interval>] [ {/ET <endtime> | /DU <duration>} [/K]] [/SD <startdate>] [/ED <enddate>] [/ENABLE | /DISABLE] [/IT] [/Z] }

Example command:

SCHTASKS /Change /RP password /TN "Backup and Restore"
							
Other -----------------
- Maintaining Desktop Health : Understanding Windows Error Reporting (part 4) - Using the Problem Reports And Solutions Control Panel
- Maintaining Desktop Health : Understanding Windows Error Reporting (part 3) - Architecture of Windows Error Reporting, Configuring Windows Error Reporting
- Maintaining Desktop Health : Understanding Windows Error Reporting (part 2) - Conceptual Components
- Maintaining Desktop Health : Understanding Windows Error Reporting (part 1) - Error Reporting Cycle, Report Data Overview
- Maintaining Desktop Health : Using Performance Information And Tools
- Maintaining Desktop Health : Understanding the Windows System Assessment Tool
- Maintaining Desktop Health : Understanding Windows Eventing (part 2) - Event Viewer User Interface
- Maintaining Desktop Health : Understanding Windows Eventing (part 1) - Windows Eventing Capabilities
- Using Voice and Sounds : Associating a Sound with an Event, Using Alternatives to Sound
- Using Voice and Sounds : Letting Your Computer Do the Talking, Creating a Sound File
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
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
Celebrity Style, Fashion Trends, Beauty and Makeup Tips.
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server