This example shows how to schedule a SQL Clone task using PowerShell and Windows Task Scheduler. The example creates a new task that'll run daily and remove any images older than a week that have no clones.
Before you follow this example, make sure:
To schedule a task:
Start Windows Task Scheduler by opening the Start menu and typing Task Scheduler.
Task Scheduler can also be opened using the Control Panel under System and Security > Administrative Tools > Task Scheduler |
Enter PowerShell as the Program/script and enter -File followed by the path to the saved PowerShell script under Add arguments and click Next:
If the path to the PowerShell file contains any spaces, make sure the path is enclosed in quotation marks. |
In the Properties window under Security options: