How to schedule external data update using Windows Task Scheduler
Please note that if you are using Portfolio Slicer on computer that is not always on (for example laptop), you can still consider setting up automated external data updates. In such case instead of selecting time when to start task, you could choose "Begin the task:" option as "At logon" or "At startup" or "At unlock".
On Windows 10 PC follow these steps to schedule external data refresh.
- Click on "Windows" button and enter "scheduler". This will show you all applications with "scheduler" in the name. Click on "Task Scheduler".
This will start "Task Scheduler" application.
- In "Task Scheduler" application select "Task Scheduler Library" folder, then do right mouse click, choose "New Folder" and enter name "PortfolioSlicer". This will add folder "PortfolioSlicer" to scheduler library:
- Select folder "PortfolioSlicer", do right mouse click and choose menu "Create Task...".
- In "General" tab enter name "PS Daily Update". Choose "Run whether user is logged on or not" and check "Run with highest privileges".
- In "Triggers" tab choose "New" and select "Being the task:" option as "On a schedule", then choose "Weekly" run (Tue-Sat) at early morning, example 6:12am
Click "OK" to close "New Trigger" window.
- In "Actions" tab choose "New" and choose action "Start a Program, then select "Browse" and go to folder where you UpdatePSData.bat file is located and select that file. For field "Start in (optional):" you must specify location of this .bat file as you want to make sure that .bat file is executed in the context of your selected folder
Click "OK" to close "New Action" window.
- Click "OK" to finish creating this task.
- Now repeat steps to create new task "PS Intraday Update", but this time choose trigger "Weekly" (Mon-Fri), start at 9:55am, repeat task every 1 hour for duration of 7 hours (this will cover stock market hours):
For trigger this time select file "UpdatePSDataIntraday.bat" and not not forget to specify "Start in" parameter value.
- You are done - now your external data fill be updated on your selected schedule.