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
| Topic | Description |
|---|---|
|
Summary of new functionality introduced by the Task Scheduler. | |
|
General conceptual information about the Task Scheduler API. | |
|
Code examples that show how to use the Task Scheduler APIs. | |
|
Detailed reference information for Task Scheduler APIs and the Task Scheduler schema. |
Send comments about this topic to Microsoft
Build date: 2/7/2012
- 10/24/2011
- fluxblocker
- 10/20/2011
- caroline gilliam
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>
- 7/27/2011
- Dallon1
- 1/27/2011
- E Persson
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....?
- 12/31/2010
- EricLive
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?
- 12/3/2010
- demmith2