Windows Task Scheduler: Difference between revisions

Content deleted Content added
m sigh.
ake references easier to read
Line 1:
'''Task Scheduler''' is a component of [[Microsoft Windows]] that provides the ability to [[Scheduling (computing))|schedule]] the launch of programs or scripts at pre-defined times or after specified time intervals. It was introduced first introduced in the [[Windows 95]] [[Microsoft Plus!|Plus! pack]] as ''System Agent'' <ref>{{cite web
| url = http://www.technofileonline.com/texts/tec032998.html
| title = Windows 98: Stable and fast, as well as 'new and improved'
| author = Al Fasoltd
| publisher = The Syracuse Newspapers
| accessdate = 2007-10-06
}}</ref> but was renamed to ''Task Scheduler'' in [[Windows 98]].
 
==Versions==
===Task Scheduler 1.0===
Task Scheduler 1.0 is included with [[Windows 2000]], [[Windows XP]] and [[Windows Server 2003]].<ref name="about">{{cite web
| url = http://msdn2.microsoft.com/en-us/library/aa446802.aspx
| title = About the Task Scheduler
| accessdate = 2007-10-06
}}</ref> It runs as a [[Windows Service]], and the task definitions and schedules are stored in [[binary]] <code>.job</code> files. Tasks are manipulated directly by manipulating the <code>.job</code> files. Each task corresponds to single action. On [[Windows 95]], [[Windows 98]] and [[Windows Me]], the Task Scheduler runs as an application (mstask.exe). It also displays a status icon in the notification area on Windows 95 and Windows 98 and runs as a hidden application on Windows Me. On the [[Windows NT]] family of operating systems, it is implemented as a [[Windows service]].
 
===Task Scheduler 2.0===
Line 16 ⟶ 26:
}}</ref>. Windows Vista uses Task Scheduler 2.0 to run various system-level tasks, as such, the Task Scheduler service cannot be disabled any more.
 
Unlike Task Scheduler 1.0, Task Scheduler 2.0 exposes an [[API]] to programmatically create tasks. It is accessed via the <code>ITaskService</code> [[Component Object Model|COM]] [[Interface (computing)|interface]].<ref name="kerr">{{cite web
Unlike Task Scheduler 1.0, Task Scheduler 2.0 exposes an [[API]] to programmatically create tasks. It is accessed via the <code>ITaskService</code> [[Component Object Model|COM]] [[Interface (computing)|interface]].<ref name="kerr">{{cite web | url = http://msdn.microsoft.com/msdnmag/issues/07/10/WindowsCPP/ | title = Task Scheduler 2.0 | author = Kenny Kerr | publisher = [[MSDN]] | accessdate = 2007-10-06}}</ref> The Windows API does not, however, include a [[Managed code|managed]] wrapper for Task Scheduler. The Task Scheduler API is also exposed for scripting languages, including [[VBScript]], [[JScript]] and [[Windows PowerShell]].<ref>{{cite web | url = http://msdn2.microsoft.com/en-us/library/aa383608.aspx | title = Task Scheduler Reference | accessdate = 2007-10-06}}</ref> The job files for Task Scheduler 2.0 are [[XML]]-based, and are human-readable, conforming to the ''Task Scheduler Schema''.<ref name="kerr"/> While it is possible to create the job files by hand, Microsoft advises not to do so, but use the Task Scheduler API. A command line utility for using Task Scheduler is also provided in terms of the <code>schtasks.exe</code> utility.<ref>{{cite web | url = http://msdn2.microsoft.com/en-us/library/bb736357.aspx | title = Schtasks.exe (Windows) | accessdate = 2007-10-06}}</ref>
| url = http://msdn.microsoft.com/msdnmag/issues/07/10/WindowsCPP/
| title = Task Scheduler 2.0
| author = Kenny Kerr
| publisher = [[MSDN]]
| accessdate = 2007-10-06
}}</ref> The Windows API does not, however, include a [[Managed code|managed]] wrapper for Task Scheduler. The Task Scheduler API is also exposed for scripting languages, including [[VBScript]], [[JScript]] and [[Windows PowerShell]].<ref>{{cite web
| url = http://msdn2.microsoft.com/en-us/library/aa383608.aspx
| title = Task Scheduler Reference
| accessdate = 2007-10-06
}}</ref> The job files for Task Scheduler 2.0 are [[XML]]-based, and are human-readable, conforming to the ''Task Scheduler Schema''.<ref name="kerr"/> While it is possible to create the job files by hand, Microsoft advises not to do so, but use the Task Scheduler API. A command line utility for using Task Scheduler is also provided in terms of the <code>schtasks.exe</code> utility.<ref>{{cite web
| url = http://msdn2.microsoft.com/en-us/library/bb736357.aspx
| title = Schtasks.exe (Windows)
| accessdate = 2007-10-06
}}</ref>
 
===Other features===
Line 24 ⟶ 48:
 
==Tasks==
The Task Scheduler service works by managing ''Tasks''; ''Task'' refers to the action (or actions) taken in response to trigger(s). A task is defined by associating a set of actions, which can include launching an application or taking some custom-defined action, to a set of triggers, which can either be time-based or event-based. In addition, a task also can contain metadata that defines how the actions will be executed, such as the security context the task will run in. Tasks are serialized to <code>.job</code> files and are stored in the [[Special folders|special folder]] titled ''Task Folder'', organized in subdirectories. Programmatically, the task folder is accessed using the <code>ITaskFolder</code> interface or the <code>TaskFolder</code> scripting object and individual tasks using the <code>IRegisteredTask</code> interface or <code>RegisteredTask</code> object.<ref>{{cite web
| url = http://msdn2.microsoft.com/en-us/library/aa382589.aspx
| title = Tasks (Windows)
| publisher = [[MSDN]]
| accessdate = 2007-10-06
}}</ref>
 
==See also==