Step 1: Find localtion of file powershell.exe
C:\Users\Administrator>where powershell.exe C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Step 2: goto Task Schedule -> Create Basic Task
Step 3: fill fields Name
and Description
then click Next
Step 4: choose a Trigger , for example i choose daily
, then click Next
Some settings:
Step 5: choose Start a grogram
then click Next
Step 6:
Paste the path found in Step 1
Arguments: "Push-Location -Path C:/Path/to/your/js/file;Start-Process node.exe index.js -WindowStyle Hidden"
Step 7: finish