Como exportar a configuração de Tarefas Agendadas

2

Estou executando o Windows 2012 R2 Server e executo muitas tarefas agendadas. Tenho medo de que, caso algo aconteça ao servidor e eu criar outro servidor, não consiga restaurar essas tarefas. Daí a minha pergunta: Eu poderia de alguma forma seguro ou melhor exportar a configuração de tarefas agendadas para restaurá-lo no mesmo ou em outro servidor? Obrigado

    
por susik 27.06.2018 / 03:09

2 respostas

1

Como posso exportar tarefas agendadas para restaurá-las no mesmo servidor ou em outro servidor?

A outra outra resposta sugere exportá-las uma a uma. Existe um método ligeiramente mais fácil:

All the Tasks created in Windows are stored in the Task Folder of Windows System Directory which in my case is C:\Windows\System32\Tasks.

  • Navigate to Tasks Folder.
  • Here you will see a couple of folders with some files inside it. They represent the same folder structure of the Task Scheduler and files have same name too.

    Windows Task Scheduler Folder Structure

  • Now copy the task files to the machine you want to export to. You can also use it to backup your tasks in case your computer needs a re installation, so you don’t have to create again.

  • Now rename the files with extension as .XML, this is the same extension used when you export the tasks using the Task Scheduler Interface.
  • Once renamed, now use the Task Scheduler Import task feature to import them one by one as Windows will not recognize them if you drop them directly into the Tasks Folder of Windows.

Fonte Como exportar tarefas em massa do Agendador de Tarefas do Windows

    
por 27.06.2018 / 09:49
1

Exportar configuração de tarefas agendadas para restauração futura

Manually Export Jobs

  1. Go to the scheduled tasks from Task Scheduler and one by one right click and select export

    enter image description here

  2. When the Save As window pops up, navigate to a folder where you want to save that configuration and ensure the File name matches the job name and then press Save.

    enter image description here


Manually Import/Restore Jobs

  1. Go to the Task Scheduler folder where you want the restored job to reside, right click that folder to the right and select Import

    enter image description here

  2. When the Open window pops up, navigate to the folder where you saved job configuration xml file, click on that file with the matching job name you want to restore, and then select Open.

    enter image description here

  3. When the Create Task window opens, go through all the options to double check the various tab settings if you want, and then press OK. If you're prompted for security credentials at this point, just type those in just as you would have whenever you set those up originally from the server you exported them from originally—security context will need to be in place if needed.

    enter image description here

Note: The file name of the XML file minus the .xml extension will be the Name of the job in Task Scheduler. If there is already a job with the same name that exists in the Task Scheduler folder you import it into, you will be given an error message indicating this and it will not allow duplicates to be created.

Otherwise, your scheduled tasks which you exported from one server (or the same server) and then imported to another server (or the same server) should be in place with the same configurations, etc. just as expected.

Mais recursos

Se você estiver interessado em uma solução de script ou PowerShell. . .

por 27.06.2018 / 07:03