How to back up and restore tasks registered in Task Scheduler

This time, we will show you how to back up and restore tasks registered in the Task Scheduler in Windows 10/11.

For example, if you do a clean install of Windows 10/11 or replace your computer, all the tasks you added will be lost.

If you find it troublesome to add the same task again, please refer to the method introduced here to back up your data and easily restore it.

table of contents

How to back up tasks registered in Task Scheduler

1. Press Windows Key + R to open Run, type the following command and press Enter:

taskschd.msc

2. Task Scheduler will open, so click on "Task Scheduler Library" on the left.

3. Right-click on the task you want to back up and click "Export".

task Scheduler
task Scheduler

4. "Save As" will appear, so open the location where you want to save it and click "Save".

Export Task - Save As
Export Task – Save As

This completes the backup task.

The backed up tasksextensionThe file is in ".xml" format, and when you open it in Notepad, it will contain the following image:

Notepad - Contents of the backed up task
Notepad – Contents of the backed up task

How to restore backed up tasks

1. Restore from Task Scheduler

1. Press Windows Key + R to open Run, type the following command and press Enter:

taskschd.msc

2. Task Scheduler will open. Right-click on "Task Scheduler Library" on the left and click "Import Tasks".

task Scheduler
task Scheduler

3.Then, the "Create Task" screen will appear. Click OK to complete the task restoration.

Creating a Task
Creating a Task

2. Restore with commands

1.Start buttonRight-click and open Terminal (Admin).

2. Type the following command and press Enter:

schtasks /create /XML "XMLファイルのパス" /tn "タスク名" /F

For example, if the file "Check for 7-zip updates.xml" is saved in the "E:\test\test" folder, the command would be as follows:

schtasks /create /XML "E:\test\test\7-zip の更新の有無をチェック.xml" /tn "7-zip の更新の有無をチェック" /F
Windows PowerShell
Windows PowerShell

You can freely change the task name. The task name entered in the command will be used when the backup is created.

Be sure to enclose the "XML file path" and "task name" in double quotation marks (").
If you do not enclose the command in double quotation marks and the name or path contains spaces, an error will occur and the command will not be executed.

Immediately execute the registered command

If you want to run the command you just registered immediately, enter the following command and press Enter:

schtasks /run /TN "タスク名"

If the task name is "Check for 7-zip updates", it will look like this:

schtasks /run /TN "7-zip の更新の有無をチェック"
If you found this article helpful, please share it on social media.

Person who wrote this article

Driven by questions arising from my daily PC use and the desire to "do more," I have been pursuing self-study in Windows since around 2008. I am sharing the "aha!" techniques and solutions I discovered through trial and error with the sole purpose of helping you in your PC life.

View profile

Comment:

To comment

[About submissions]
We welcome any questions or information regarding the content of the article.
However, please note that content unrelated to the purpose of the article, criticism of specific individuals or organizations, offensive language,Inappropriate wordsComments containing the above may be deleted or made private without notice at the discretion of the administrator.
Please note that spam may be automatically deleted by anti-spam measures.

CAPTCHA


table of contents