Content deleted Content added
Importing Wikidata short description: "Component of Microsoft Windows" (Shortdesc helper) |
Windows Task Scheduler is included in ReactOS too, added it to infobox |
||
(12 intermediate revisions by 10 users not shown) | |||
Line 1:
{{Short description|
{{distinguish|Windows Task Manager}}
{{Use mdy dates|date=December 2022}}
{{Infobox software
| name = Windows Task
| screenshot
| screenshot_size
| caption
| developer
| released
| other_names
| replaces
| service_name
| programming language
| included with
* [[Windows 98]] and later<br />(Windows 9x family)
* [[Windows 2000]] and later<br />(Windows NT family)
* [[ReactOS]]<br />(Windows NT-like)
| genre
}}
'''Task Scheduler''' (formerly '''Scheduled Tasks''')<ref name=":0" /> is a [[job scheduler]] in [[Microsoft Windows]] that launches [[computer program]]s or scripts at pre-defined times or after specified time intervals.<ref>{{Cite web|title=Keep your Windows desktop in shape with Task Scheduler|work=[[TechRepublic]]|date=January 4, 2002
Task Scheduler can be compared to [[cron]] or [[anacron]] on [[Unix-like]] [[operating system]]s. This service should not be confused with the [[Scheduling (computing)#Windows|scheduler]], which is a core component of the OS [[kernel (
==Versions==
Line 27 ⟶ 29:
| url = http://msdn2.microsoft.com/en-us/library/aa446802.aspx
| title = About the Task Scheduler
| access-date = October 6, 2007
| work = [[MSDN]]
| publisher = [[Microsoft]]
}}</ref> It runs as a [[Windows Service]], and the task definitions and schedules are stored in [[Binary file|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]] (with [[Internet Explorer 4.0]] or later), [[Windows 98]] and [[Windows Me]], the Task Scheduler runs as an ordinary program, <code>mstask.exe</code>. It also displays a status icon in the notification area on Windows 95 and Windows 98 and runs as a hidden service on Windows Me, but can be made to show a tray icon.<ref name=":0">{{cite web|url=http://support.microsoft.com/kb/272962|title=How to Enable the Scheduled Tasks Icon in Windows Me|date=January 29, 2007|work=Support|publisher=[[Microsoft]]|url-status=dead|archive-url=https://web.archive.org/web/20080130185556/http://support.microsoft.com/kb/272962|archive-date=January 30, 2008}}</ref> Computer programs and [[Scripting language|scripts]] can access the service through six [[Component Object Model|COM]] [[Interface (computing)|interfaces]].<ref>{{Cite web|url = https://msdn.microsoft.com/en-us/library/windows/desktop/aa383581%28v=vs.85%29.aspx|title = Task Scheduler 1.0 Interfaces|access-date =
In addition to the graphical user interface for Task Scheduler in [[Control Panel (Windows)|Control Panel]], Windows provides two command-line tools for managing scheduled task: <code>[[at (command)|at.exe]]</code> (deprecated)<ref>{{cite web|url=https://www.computerhope.com/at.htm|title=MS-DOS and Windows command line at command|access-date=
===Task Scheduler 2.0===
Line 40 ⟶ 42:
|last1=Paul|first1=Ian
|work=[[PCWorld]]
|date=September 5, 2014
|access-date=
}}</ref> logoff, or only during or for a specified time. [[XPath]] expressions can be used to filter events from the [[Windows Event Log]]. Tasks can also be delayed for a specified time after the triggering event has occurred, or repeat until some other event occurs. Actions that need to be done if a task fails can also be configured. The actions that can be taken in response to triggers, both event-based as well as time-based, not only include launching applications but also take a number of custom actions. Task Scheduler includes a number of actions built-in, spanning a number of applications; including send an e-mail, show a message box, or fire a [[Component Object Model|COM]] handler when it is triggered. Custom actions can also be specified using the Task Scheduler API. Task Scheduler keeps a history log of all execution details of all the tasks.<ref name="taskscheduler">{{cite web
|url=http://www.microsoft.com/technet/windowsvista/mgmntops/taskschd.mspx
Line 53 ⟶ 55:
|archive-date=April 12, 2006
}}</ref> Windows Vista uses Task Scheduler 2.0 to run various system-level tasks;<ref>{{cite web|url=http://support.microsoft.com/kb/939039|title=Description of the scheduled tasks in Windows Vista|date=August 24, 2007|url-status=live|archive-url=https://web.archive.org/web/20071022033307/http://support.microsoft.com/kb/939039|archive-date=October 22, 2007}}</ref> consequently, the Task Scheduler service can no longer be disabled (except with a simple registry tweak).
[[Image:Windows 7 Task Scheduler.png|thumb|right|Task Scheduler 2.0 in [[Windows 7]]]]
Task Scheduler 2.0 exposes an [[API]] to allow computer programs and scripts create tasks.<ref name="VBSPR" /><ref name="kerr">{{cite web
| url = http://msdn.microsoft.com/msdnmag/issues/07/10/WindowsCPP/
Line 60 ⟶ 62:
| work = [[MSDN]]
| publisher = [[Microsoft]]
| access-date = October 6, 2007
| date = October 2007
| url-status=dead
| archive-url = https://web.archive.org/web/20071226223747/http://msdn.microsoft.com/msdnmag/issues/07/10/WindowsCPP/
| archive-date = December 26, 2007
}}</ref> It consists of 42 [[Component Object Model|COM]] [[Interface (computing)|interfaces]].<ref>{{Cite web|url = https://msdn.microsoft.com/en-us/library/aa383600%28v=vs.85%29.aspx|title = Task Scheduler 2.0 Interfaces|access-date =
====Other features====
Line 78 ⟶ 80:
| work = [[MSDN]]
| publisher = [[Microsoft]]
| access-date = October 6, 2007
}}</ref>
==Column 'Last Result'==
The Last Result column displays a completion code. The common codes for scheduled tasks are:<ref>{{cite web|title=How to troubleshoot scheduled tasks in Windows XP and in Windows Server 2003|url=http://support.microsoft.com/kb/308558|work=Support|publisher=[[Microsoft]]|access-date=September 3
{{Div col|small=yes}}
Line 131 ⟶ 133:
* 0x80041327: The task has properties that are not compatible with earlier versions of Windows.
* 0x80041328: The task settings do not allow the task to start on demand.
* 0x80070002: The Task Scheduler cannot find the file.
* 0x800710E0: The operator or administrator has refused the request.
* 0xC000013A: The application terminated as a result of a CTRL+C.
* 0xC0000142: The application failed to initialize properly.
Line 136 ⟶ 140:
==Bugs==
On Windows 2000 and Windows XP, when a computer is prepared for [[disk imaging]] with the [[sysprep]] utility, it cannot run tasks configured to run in the context of the [[Superuser|SYSTEM account]]. Sysprep changes the [[security identifier]] (SID) to avoid duplication but does not update scheduled tasks to use the new SID. Consequently, the affected tasks fail to run. There is no solution for this problem but one may reschedule the affected tasks to work around the issue.<ref>{{cite web|title=Scheduled tasks may not start if you used a System Preparation image to install Windows XP or Windows 2000|url=http://support.microsoft.com/kb/313111|work=Support|publisher=[[Microsoft]]|access-date=
On Windows Vista or Windows Server 2008, the next execution time displayed in Task Scheduler may be wrong. Microsoft issued a [[hotfix]] to remedy this issue.<ref>{{cite web|date=
</ref>
|