This is a guide on how to set up a batch file or powershell script to a schedule in windows task scheduler.
Right click on the "Task scheduler library" and select "New folder..."
For this example, we called the folder ETL
Select the newly created folder
Right-click in the main window and select "Create Basic Task..."
Define a name and description for the scheduled task, then click "Next"
Define a schedule, then click "Next"
Define the specifics of your selected trigger (in our example we used Daily"
Leave it at "Start a program" and click "Next"
Click "Browse"
Browse to and select your script or powershell, then click "OK"
Click "Next"
Tick the "Open properties" open and then click "Finish"
On the properties page, change the security settings so that a service account can run the script on the highest privileges and whether it is logged in or not. This will ensure your script runs on your server at the scheduled time no matter what. Click OK when finished.
When you click "OK", a password for the service account will need to be entered, this is encrypted on your computer. Enter the password and click "OK"
The task is now saved and scheduled