-
Notifications
You must be signed in to change notification settings - Fork 2
Run Automatically
Elliot Huffman edited this page Jul 26, 2018
·
1 revision
The recommended way to run this script is with task scheduler. You can find it by searching "task" in the start menu or by running the command Taskschd.msc
in the run box.
- In the task scheduler create a new task.
- (we are using "create basic task..." for this how to).
- Name it something that you would recognize such as "Spigot Auto Update". 2. (The description is optional. I generally recommend filling in some context here).
- Make sure that the trigger is set to "Daily".
- Set the time of day that the task will be executed. 4. Generally a time when people are not on your server is a good time.
- Make sure that "Start a Program" is selected.
- To execute the script you will need to specify
powershell -file "C:\Path\to script\autoupdate.ps1"
. - Push "No" on the box that pops up next.
- Before you push "finish" check the box that says "Open the Properties dialog for this task when I click Finish".
- Push "Finish".
- go to the actions tab and edit the action.
- In the "Add arguments (optional)" box add the options you need your script to process E.G.
-BuildVersion "1.11" -ServerStartScript "start.bat"
. - press "OK" then "No" to the box that will pop up.
- Go to the conditions tab and uncheck the Start only is connected to AC power option.
- Go to settings and uncheck the "Stop the task if it runs longer than:" option.
- Press OK and you're finished!