Import a Task

Applies To: Windows 7, Windows Server 2008 R2, Windows Server 2012, Windows Vista

You can import a task, which will add the imported task to a task folder and allow you to use and run the task. A task's properties, triggers, actions, conditions, and settings are represented in an XML file. A task's XML is defined by the Task Scheduler Schema. To see an example of the XML that represents a task, export a task and view the saved XML file. For more information about exporting tasks, see Export a Task.

To import a task by using the Windows interface

  1. If Task Scheduler is not open, start Task Scheduler. For more information, see Start Task Scheduler.

  2. Find and click the task folder in the console tree in which you want to import the task. To import the task in a new task folder, see Create a New Task Folder to create the folder.

  3. In the Actions Pane, click Import Task .

  4. The Open dialog box will appear. Find the task XML file that you want to import and click the Open button.

  5. The Create Task dialog box will appear. The General , Triggers , Actions , Conditions , and Settings tabs in the Create Task dialog box all contain the information from the imported task.

  6. Click the OK button on the Create Task dialog box.

To import a task by using a command line

  1. Open a command prompt. To open a command prompt, click Start , click All Programs , click Accessories , and then click Command Prompt .

  2. Type:

    schtasks /Create [/S <system> [/U <username> [/P [<password>]]]]
    /XML <xmlfile> /TN <taskname>

To view the help for this command, type:

schtasks /Create /?

Additional references

Export a Task

Change an Existing Task

Command-line syntax notation