Published by


Brink's Avatar
Administrator

Posts: 20,725

Show Printable Version 


How to Export a Task from Task Scheduler in Windows

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

You can export a task so that the task is stored in an XML file which can be imported by other users and computers. A task's properties, triggers, actions, conditions, and settings are represented in an XML file.

If you created a task in Task Scheduler, then it would be a good idea to back up the task by exporting it as an XML to make it easy to restore (import) in the future as needed.

This tutorial will show how to export a task from Task Scheduler as an .xml file backup in Vista, Windows 7, Windows 8, and Windows 10.


CONTENTS:





Export Task from Task Scheduler in Windows OPTION ONE Export Task from Task Scheduler in Windows
To Export a Task in Task Scheduler

1. Press the Win+R keys to open the Run dialog, type taskschd.msc, and click/tap on OK to open Task Scheduler.

2. Navigate to the task folder location (ex: "Task Scheduler Library") in the left pane, select the task (ex: "Create Restore Point on Schedule") you want to export in the middle pane, and click/tap on Export in the far right Actions pane. (see screenshot below)

Click image for larger version. 

Name:	Export_task-1.png 
Views:	62 
Size:	80.8 KB 
ID:	103556

3. Browse to the location you want to export the task, type in a name you want for the .xml file, and click/tap on Save. (see screenshot below)

Click image for larger version. 

Name:	Export_task-2.png 
Views:	46 
Size:	27.3 KB 
ID:	103557

4. When finished, you can close Task Scheduler if you like.






Export Task from Task Scheduler in Windows OPTION TWO Export Task from Task Scheduler in Windows
To Export a Task in Command Prompt

Note   Note
For more details about the schtasks and schtasks /Query commands, see: Schtasks.exe (Windows)


1. Open a command prompt.

2. Type the command below into the command prompt, and press Enter. (see screenshot below)

schtasks /Query /XML /TN "task folder location\task name" > "%UserProfile\Desktop\name.xml"

Click image for larger version. 

Name:	Export_task_command.png 
Views:	49 
Size:	15.5 KB 
ID:	103558

Note   Note
Substitute task folder location in the command above with the actual task's folder location (ex: "") like in Task Scheduler below.

Substitute task name in the command above with the actual task's name (ex: "Create Restore Point on Schedule") like in Task Scheduler below.

Substitute name in the command above with the name you want for the exported .xml file.

For example:

Code:
schtasks /Query /XML /TN "\Create Restore Point on Schedule" > "%UserProfile%\Desktop\taskname.xml"
Click image for larger version. 

Name:	task_info.png 
Views:	47 
Size:	82.9 KB 
ID:	103559


3. You can now move the .xml file on your desktop to where you like as a backup of this task.

4. When finished, you can close the command prompt if you like.


That's it,
Shawn