16 out of 45 rated this helpful - Rate this topic

Task Scheduler

Purpose

The Task Scheduler enables you to automatically perform routine tasks on a chosen computer. The Task Scheduler does this by monitoring whatever criteria you choose to initiate the tasks (referred to as triggers) and then executing the tasks when the criteria is met.

Where applicable

The Task Scheduler can be used to execute tasks such as starting an application, sending an e-mail, or showing a message box. Tasks can be scheduled to execute:

  • When a specific system event occurs.
  • At a specific time.
  • At a specific time on a daily schedule.
  • At a specific time on a weekly schedule.
  • At a specific time on a monthly schedule.
  • At a specific time on a monthly day-of-week schedule.
  • When the computer enters an idle state.
  • When the task is registered.
  • When the system is booted.
  • When a user logs on.
  • When a Terminal Server session changes state.

Developer audience

The Task Scheduler provides APIs for the following developers:

  • Task Scheduler 1.0: Interfaces are provided for C++ development.
  • Task Scheduler 2.0: Interfaces and objects are provided for C++ and scripting development respectively.

Run-time requirements

The Task Scheduler requires the following operating systems.

  • Task Scheduler 1.0: Client requires Windows Vista, Windows XP, Windows 2000 Professional, Windows Me, or Windows 98. Server requires Windows Server 2008, Windows Server 2003 or Windows 2000 Server.
  • Task Scheduler 2.0: Client requires Windows Vista. Server requires Windows Server 2008.

In this section

TopicDescription

What's New in Task Scheduler

Summary of new functionality introduced by the Task Scheduler.

About the Task Scheduler

General conceptual information about the Task Scheduler API.

Using the Task Scheduler

Code examples that show how to use the Task Scheduler APIs.

Task Scheduler Reference

Detailed reference information for Task Scheduler APIs and the Task Scheduler schema.

 

 

 

Send comments about this topic to Microsoft

Build date: 2/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Simple batch file
Using a simple batch file to copy some files. Works perfectly when I type in the name of the batch file from a command line. Windows Server 2008 R1 32-bit, standard. I always leave box unchecked for "run only when user is logged in", and always select "run with highest privileges". I have deleted and recreated the task several times. I used "browse" to find the file when setting up the task, so I know the path is correct and the file is there. I have made certain that the user account the task is set up to run under has full control NTFS permissions on the folder containing the file, and on the file itself. I have even included the full path to the folder, i.e. c:\batch\ in the "Start in:" field. The account running the task is a local admin on the server and an enterprise admin on the domain. I am telling you, there is something awry in this... a serious bug; MS needs to put out a patch for this. I would be extremely grateful to anyone with a fix or even a workaround; I don't want to buy another expensive server backup license just to back up (copy) a dozen or so files. XP mode, perhaps?
Farm work schedul
work friday and then for three weeks brushing and cleaning and the first week feeding tilll thursday and then brushing each day the nest two days
windows update
Windows update
System cannot find the path specified
I took the suggestion of exporting the task to review the content. I had browsed my way to select the task, which was a WinZIP backup job that resided on a network drive; letter X:. I replaced the Command value that had the network drive letter, with the full path name. The task was then imported and it then ran as expected.
Before:
  <Actions Context="Author">
    <Exec>
      <Command>X:\MyBackupRoutineIncr.wjf</Command>
    </Exec>
  </Actions>

After:
  <Actions Context="Author">
    <Exec>
      <Command>\\xy.prod.company.com\users\username\MyBackupRoutineIncr.wjf</Command>
    </Exec>
  </Actions>

islm
islmymn
Task Scheduler 1.0 under Windows Vista, Windows 7 etc.
Is it really possible to use Task Scheduler 1,0 under Windows Vista and Windows 7? How can it be done?
Task Scheduler work-around for Win7
I have the same trouble with Win7 Task Scheduler - Creating a simple task to launch a script/program does not work.

I exported my non-working task as well as a working MS task and compared them.  I changed the following parameter in my exported task and re-imported it and now it works: 
    <UseUnifiedSchedulingEngine>true</UseUnifiedSchedulingEngine>

This work-around is getting me by for now.

Other thoughts:
There does not appear to be a Task Scheduler GUI setting to affect this parameter?
The API description implied a setting of false should work, but for some reason it doesn't?
It's hard to believe such a fundemental overshight exists; could it be something else with my Win7 setup that requires the true setting?
I seem to recall the same problem with a fresh Vista install in the past that was mysteriously resolved before I investigated a work-around.  Hmmm...
I think I read also that the new scheduling engine associated with the true setting curiously does not support things like monthly scheduling....?
Task Schedule in Windows 7 fails but works in Windows XP Pro
I have a scheduled task that executes perfectly well in Windows XP Pro but the same task in Windows 7 returns a "0x2" under "Last Run Result". According to the command line command, "net helpmsg 2", "0x2" equates to "The system cannot find the file specified."

I can certainly find the file, and the path I use in the Actions tab has been checked, re-checked, double-checked and triple-checked.

I have read countless posts in multiple forums about this issue. I have yet to find a satisfactory answer.

The action that the task is supposed to execute is a .bat file that calls a Perl script. The Perl script writes one each of the following file types, .txt, .csv, and .xml. Execution of the .bat file from the command line works perfectly well; however, once it is put into a Windows 7 scheduled task, it returns 0x2. This same task under Windows XP Pro works like a champ. What is it about Windows 7 tasks that make it so difficult to execute successfully?