Migrating Scheduled Tasks
You can migrate scheduled tasks using the Administrative Console or the CLI using virtatasks.
Notes:
If you want to migrate user-defined environment variables along with a scheduled task, select and migrate the user account on the Source Accounts tab.
Docking or dissolving a container installs a task to the underlying operating system. In doing so, VirtaMove maintains the folder structure that was on the source machine. For Windows Server 2008 and later sources, tasks can be nested under layers of folders. If these folders do not exist when a task is being installed, they will be created on the destination machine to store the task. Undocking the container removes the task from the underlying operating system. However, any folders that were created to store the task will not be removed.
To Migrate Scheduled Tasks Using the Administrative Console
Complete all pre-requisites and complete steps 1-12 inclusive as outlined in the procedure Migrating an Application Using the VirtaMove Administrative Console.
Click the Source Tasks tab and select a task or tasks as appropriate.
If user accounts are associated with tasks, manually add the user accounts and associated passwords to the tasks. Click the Source Accounts tab and select applicable user accounts and click Save. You will not be able to change the Run As account settings using Windows Task Scheduler in steps 5-8 if the account is not tethered over with the task.
When you are ready, click the Pre-Populate button. If you have not yet activated your VirtaMove license key, you will now be prompted to do so. See Activating Your VirtaMove License for information. Note that the Pre-Populate portion process may take some time. A window displays the status of the Pre-Populate process and the amount of data copied. If you hover over the data moved in green, you can see the estimated time remaining. You can cancel the process by clicking Cancel.
At the Migrating application data stage of pre-populate, the Tether Monitor icon in the system tray will spin until the end of the process. If you hover over the spinning icon, a tooltip will show the file size transferred and the rate of transfer.
Click the Close button in the VirtaMove Pre-Population window to close the window when the process is complete.
You will be asked whether to overwrite existing tasks that have the same name as the selected tasks. Click Yes or No. Selected tasks will be copied over to the container application when the container is docked during the tether process. Note that if a task contains actions not supported on Windows Server 2012 and Windows Server 2012R2, these actions will be removed. Additionally, if user accounts are associated with tasks, you will have to manually add the user accounts and associated passwords to the tasks in steps 5-8 using Windows Task Scheduler.
Once the container docks, open Windows Task Scheduler and change the Run As account settings and running type for each task you selected. Double-click a task. In the task Properties window, click the Change User or Group button.
In the Select User or Group window, enter the account name for the task if required. For example,
Administrator
. Click OK.If you want an interactive window, select Run Only When User Is Logged On.
In Task Scheduler, exercise a task by right-clicking the task and selecting Run.
Click the Undock button. This undocks the container and each task you selected will be removed from the underlying operating system.
If you will Dissolve the container, you will need to open Task Scheduler again after Dissolve and set the correct Run As setting for each migrated task, as described above in steps 4-6.
To Migrate Scheduled Tasks Using the CLI
Create a container if you don't already have an existing container. If you have an existing container, skip to step 2.
virtacreate C:\apliances\<container> /E
where
<container>
is the full name and path of the appliance.Find the scheduled tasks on a source machine using the virtatasks utility.
virtatasks C:\appliances\<container> servername username password /L
If VirtaMove Source Agent is installed on the source machine, specify only
servername
.
A .csv file will be generated inC:\appliances\<container>\TaskSelect.csv
.Open the .csv file and place an x before the comma in the line for each task you wish to migrate.
Export the scheduled tasks to the container:
virtatasks C:\appliances\<container> servername username password /E
If VirtaMove Source Agent is installed on the source machine, specify only
servername
.
Note: Tasks that have the same name as local tasks will not be docked.Dock the container:
Run and exercise the task in Windows.
Undock the container:
Optionally dissolve the container.