Muokkaa

Jaa


Exec (actionGroup) Element

Specifies an action that executes a command-line operation.

<xs:element name="Exec"
    type="execType"
 />

The Exec element is defined by the actionGroup .

Parent element

Element Derived from Description
Actions actionsType Contains the actions performed by the task.

Child elements

Element Type Description
Arguments string Specifies the arguments associated with the command-line operation.
Command string Specifies the executable file or document to be run.
WorkingDirectory string Specifies the directory where either the executable or those files used by the executable exists.

Attributes

Name Type Description
id string The identifier of the action performed by the task.

Remarks

The child elements listed above are defined by the execType complex type.

For script development, an execution action is defined by the ExecAction object.

For C++ development, an execution action is defined by the IExecAction interface.

If environment variables are used in the Command, Arguments, or WorkingDirectory elements, then the values of the environment variables are cached and used when the Taskeng.exe (the task engine) is launched. Changes to the environment variables that occur after the task engine is launched will not be used by the task engine.

Examples

For a complete example of the XML for a task that uses an event trigger, see Time Trigger Example (XML).

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]

See also

Task Scheduler Schema Elements