- Open Task Scheduler (
Win + R, taskschd.msc)
- Go to Actions > Create Basic Task...
- Enter a name and description
- Select trigger, e.g. Daily, One time, When I log on...
- Configure action:
- Type: Start a program
run <script-name>, e.g.
- Start in: directory where package.json is located, e.g.
- Click Finish and test your action
Additionally, if you want the task to run in the background, make sure to select "Run whether user is logged on or not" under General properties for the task.