How To: Schedule a script to automate HVR using Windows Task Scheduler
Abstract
This article provides the procedural steps to schedule a script (powerShell) using Windows Task Scheduler.
Applies to
The steps in this document applies to your HVR installation on your hub running on Windows only.
Scenario
You would like to automate managing HVR Software using scripts and schedule the scripts to execute at your desired times. The solution is to use Windows Task Scheduler to schedule your script.
Prerequisites
1.HVR HUB running on Windows
2.Powershell script to run in your Windows Task Scheduler
Overview·
- Have your scripts tested and ready to run·
- Steps to use Windows Scheduler·
- Optional: A powershell script that will backup your hvr catalogs is provided for either example use or actual use
Steps
The following are detailed steps to setup a powershell script(.ps1) using your Windows Task Scheduler
Scheduling via Windows Task Scheduler
Step 1] Open up Task Scheduler on your Windows server where HVR HUB resides
Step 2] Using the Task Scheduler Wizard
A] Click on Create Basic Task
B] Enter any name you choose (meaningful to the scripts function is suggested)
C] Click Next
Step 3] Choose how often you would like your script to run
A].Click your desired time for your task to start
B]Click Next
C]Choose your Day Of The Week
Step 4] In ACTION, choose Start a program
A] Click your desired time for your task to start
B] Click Next
Step 5] Start a Program
A].Program/script: Enter the location to your PowerShell.exe file. (The actual powershell executable itself, NOT YOUR SCRIPT)
C:/Windows/System32/WindowsPowerShellv1.0/powershell.exe
B] Add arguments: Enter full path to where your PS script resides in quotes
"C:/myScripts/exportCatalogsWithPrompts.ps1"
C] Click Next
Step 6] Verify and Finish
a.Verify and click Finish.
Step 7] Verify your script works
A] Click on your Taskb.Test by clicking Run