Scheduling CompactVHD to Run Weekly
To schedule CompactVHD to run weekly, complete the following tasks:
- Open the Task Scheduler in Windows. and create a New Basic Task.
- In the Actions column, click the Create Basic Task option.
- Enter a name for the task.
- Click the Next button.
- Select the Weekly radio button.
- Click the Next button.
- Set your task to start when your window of downtime begins.
- Click the Next button.
- Select the Start a program radio button.
- Click the Next button.
- In the Program/script field, enter the location of the CompactVHD executable.
- In the Add arguments (optional) field, enter the command line arguments.
- In the Start in (optional) field, enter the path where the executable is stored.
- Click the Next button.
- On the Summary screen, select the Open the Properties dialog for this task when I click Finish checkbox.
- Click the Finish button.
- On the Properties screen that opens, select the Run whether user is logged on or not radio button.
- Click the Change User or Group button and pick your “Domain account” that the tool will run under. It is very important this service account already has read and write permissions to where the user’s VHDs are stored. If the account does not have read and write permissions, the job will fail on those where access is denied.
- Select the Run with highest privileges checkbox.
- In the Configure for field, select Windows Server 2016.
- Click the Settings tab.
- Change the setting for Stop the task if it runs longer than to 54 hours. The example of 54 hours comes from the use case above where we created a buffer for when things start and end. The job itself stops after 53 hours. We do not want the job to be running any time users might login. If the job is still running after 54 hours it will be terminated.
- Click OK and then on the Task Scheduler login screen, enter your account password to run the scheduled task.
