How to Import a Task to Task Scheduler in Windows
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
- Option One: To Import a Task in Task Scheduler
- Option Two: To Import a Task in Command Prompt
1 Press the Win + R keys to open the Run dialog, type taskschd.msc into Run, 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)
3 Browse to the location you saved the exported task, select the .xml file, and click/tap on Open. (see screenshot below)
4 Click/tap on OK. (see screenshot below)
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)
6 The task will now be imported into the task folder in Task Scheduler. (see screenshot below)
You must be logged in as an administrator to use this option.
For more usage details about the schtasks and schtasks /Create commands, see: Schtasks.exe | Microsoft Docs
1 Open an elevated command prompt.
2 Type the command below into the elevated 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 *
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:schtasks /Create /XML "%UserProfile%\Desktop\taskname.xml" /TN "%UserProfile%\Desktop\taskname.xml" /RU "W10BrinkDesktop\Brink" /RP *
3 Type the password of the account you specified to run the task as, and press Enter. (see screenshot below)
4 When finished, you can close the elevated command prompt if you like.
5 The task will now be imported to the specified task folder in Task Scheduler. (see screenshot below)
That's it,
Shawn
Related Tutorials
- How to Enable or Disable Scheduled Task in Windows 10
- How to Export a Task from Task Scheduler in Windows
- How to Create Task to Run App or Script at Logon in Windows 10
- How to Delete Scheduled Task in Windows 10