Published by


Brink's Avatar
Administrator

Posts: 18,906

Show Printable Version 


How to Import a Task to 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 import an exported 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.

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


CONTENTS:





Import Task to Task Scheduler in Windows OPTION ONE Import Task to Task Scheduler in Windows
To Import 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 for where you want to import the task to, and click/tap on Import in the far right Actions pane. (see screenshot below)

Click image for larger version. 

Name:	Import_task-1.png 
Views:	45 
Size:	51.5 KB 
ID:	103572

3. Browse to the location you saved the exported task, select the .xml file, and click/tap on Open. (see screenshot below)

Click image for larger version. 

Name:	Import_task-2.png 
Views:	45 
Size:	28.5 KB 
ID:	103573

4. Click/tap on OK. (see screenshot below)

Name:  Import_task-3.png
Views: 332
Size:  23.5 KB

5. If you have Run whether user is logged on or not checked above, then you will be prompted to enter your credentials for running the task with. Click/tap on OK. (see screenshot below)

Name:  Import_task-4.png
Views: 342
Size:  14.0 KB

6. The task will now be imported into the task folder in Task Scheduler. (see screenshot below)

Click image for larger version. 

Name:	Import_task-5.png 
Views:	45 
Size:	69.7 KB 
ID:	103576






Import Task to Task Scheduler in Windows OPTION TWO Import Task to Task Scheduler in Windows
To Import a Task in Command Prompt

Note   Note
You must be logged in as an administrator to be able to do this option.

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


1. Open an elevated command prompt.

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

schtasks /Create /XML "full path of .xml file" /TN "task folder location\task name" /RU "Computer name\User name" /RP *


Note   Note
Substitute full path of .xml file in the command above with the actual full path of the task's exported .xml file.

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 Computer name in the command above with the actual computer name (ex: "W10BrinkDesktop").

Substitute User name in the command above with the actual user name (ex: "Brink") of the account you want to run the task as.

For example:

Code:
schtasks /Create /XML "%UserProfile%\Desktop\taskname.xml" /TN "%UserProfile%\Desktop\taskname.xml" /RU "W10BrinkDesktop\Brink" /RP *

3. Enter the password of the account you specified to run the task as, and press Enter. (see screenshot below)

Click image for larger version. 

Name:	Import_task_command.png 
Views:	46 
Size:	23.0 KB 
ID:	103571

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

5. The task will now be imported to the specified task folder in Task Scheduler. (see screenshot below)

Click image for larger version. 

Name:	task_info.png 
Views:	58 
Size:	82.9 KB 
ID:	103577


That's it,
Shawn