ArticleslgStudy

computer science

Windows Task Scheduler

Windows Task Scheduler is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Windows Task Scheduler rather than just read about it. In short: Task Scheduler (formerly Scheduled Tasks) is a job scheduler in Microsoft Windows that launches computer programs or scripts at pre-defined times or after specified time intervals. Microsoft introduced this component in the Microsoft Plus! for Windows 95 as System Agent.

Windows Task Scheduler — main illustration
Windows Task Scheduler — illustration

Key takeaways

  • Windows Task Scheduler belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Windows Task Scheduler to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Windows Task Scheduler from memory before moving on to harder problems.

Reference excerpt

Task Scheduler (formerly Scheduled Tasks) is a job scheduler in Microsoft Windows that launches computer programs or scripts at pre-defined times or after specified time intervals. Microsoft introduced this component in the Microsoft Plus! for Windows 95 as System Agent. Its core component is an eponymous Windows service. The Windows Task Scheduler infrastructure is the basis for the Windows PowerShell scheduled jobs feature introduced with PowerShell v3. Task Scheduler can be compared to cron or anacron on Unix-like operating systems. This service should not be confused with the scheduler, which is a core component of the OS kernel that allocates CPU resources to processes already running.

Versions

Task Scheduler 1.0 Task Scheduler 1.0 is included with Windows NT 4.0 (with Internet Explorer 4.0 or later), Windows 2000, Windows XP and Windows Server 2003. It runs as a Windows Service, and the task definitions and schedules are stored in binary .job files. Tasks are manipulated directly by manipulating the .job 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, mstask.exe. 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. Computer programs and scripts can access the service through six COM interfaces. Microsoft provides a scheduling agent DLL, a sample VBScript and a configuration file to automate Task Scheduler. In addition to the graphical user interface for Task Scheduler in Control Panel, Windows provides two command-line tools for managing scheduled task: at.exe (deprecated) and schtasks.exe. However, at.exe cannot access tasks created or modified by Control Panel or schtasks.exe. Also, tasks created with at.exe are not interactive by default; interactivity needs to be explicitly requested. The binary ".job" files which the AT command produces are stored in the %WINDIR%\Tasks directory.

Task Scheduler 2.0 Task Scheduler 2.0 was introduced with Windows Vista and included in Windows Server 2008 as well. The redesigned Task Scheduler user interface is now based on Management Console. In addition to running tasks on scheduled times or specified intervals, Task Scheduler 2.0 also supports calendar and event-based triggers, such as starting a task when a particular event is logged to the event log, or when a combination of events has occurred. Also, several tasks that are triggered by the same event can be configured to run either simultaneously or in a pre-determined chained sequence of a series of actions, instead of having to create multiple scheduled tasks. Tasks can also be configured to run based on system status such as being idle for a pre-configured amount of time, on startup, 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 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. Windows Vista uses Task Scheduler 2.0 to run various system-level tasks; consequently, the Task Scheduler service can no longer be disabled (except with a simple registry tweak).

Task Scheduler 2.0 exposes an API to allow computer programs and scripts create tasks. It consists of 42 COM interfaces. The Windows API does not, however, include a managed wrapper for Task Scheduler though an open source implementation exists. The job files for Task Scheduler 2.0 are XML-based, and are human-readable, conforming to the Task Scheduler Schema.

Other features New security features, including using Credential Manager to passwords for tasks on workgroup computers and using Active Directory for task credentials on domain-joined computers so that they cannot be retrieved easily. Also, scheduled tasks are executed in their own session, instead of the same session as system services or the current user. Ability to wake up a machine remotely or using BIOS timer from sleep or hibernation to execute a scheduled task or run a previously scheduled task after a machine gets turned on. Ability to attach tasks to events directly from the Event Viewer.

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 .job files and are stored in the special folder titled Task Folder, organized in subdirectories. Programmatically, the task folder is accessed using the ITaskFolder interface or the TaskFolder scripting object and individual tasks using the IRegisteredTask interface or RegisteredTask object.

Column 'Last Result' The Last Result column displays a completion code. The common codes for scheduled tasks are:

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 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. 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.

See also cron, job scheduler for Unix-like operating systems

References

… excerpt ends here. Continue reading the full article.

Illustrations

Windows Task Scheduler: Task Scheduler 2.0 in Windows 7
Task Scheduler 2.0 in Windows 7

Worked examples

Example 1 — a first encounter with Windows Task Scheduler

Start with the simplest possible case. Write down what Windows Task Scheduler claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Windows Task Scheduler before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Windows Task Scheduler ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Windows Task Scheduler

In research
Windows Task Scheduler appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Windows Task Scheduler in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Windows Task Scheduler is common in secondary-school and first-year university syllabi. It links to neighbouring topics 1995 software, Windows administration, Windows commands, so understanding it makes those chapters shorter.
In everyday life
Look for Windows Task Scheduler outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Windows Task Scheduler” →

How to study Windows Task Scheduler in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Windows Task Scheduler means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Windows Task Scheduler out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Windows Task Scheduler in simple terms?

Task Scheduler (formerly Scheduled Tasks) is a job scheduler in Microsoft Windows that launches computer programs or scripts at pre-defined times or after specified time intervals. Microsoft introduced this component in the Microsoft Plus! for Windows 95 as System Agent.

Why does Windows Task Scheduler matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Windows Task Scheduler?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Windows Task Scheduler.

Tags

  • 1995 software
  • Windows administration
  • Windows commands
  • Windows services

Keep exploring