title: Windows Task Scheduler for a .js file - tutorials aren't working. What should I do?
body: <p>Following <a href="https://www.youtube.com/watch?v=ic4lUiDTbVI" rel="nofollow noreferrer">this tutorial</a> for automating a Python script worked several months ago.</p>
  <p>All the javascript/nodejs tutorials below seem equivalent, with subtle variations on the inputs, but none of them work.</p>
  <p>Have any of you managed to get Windows Task Scheduler to automate a .js script?</p>
  <hr />
  <ul>
  <li><p><a href="https://joshuatz.com/posts/2020/using-windows-task-scheduler-to-automate-nodejs-scripts/" rel="nofollow noreferrer">https://joshuatz.com/posts/2020/using-windows-task-scheduler-to-automate-nodejs-scripts/</a></p>
  <blockquote>
  <p>uses npm.cmd</p>
  </blockquote>
  </li>
  <li><p><a href="https://www.htmlcoding.net/run-nodejs-scripts-with-windows-task-scheduler/" rel="nofollow noreferrer">https://www.htmlcoding.net/run-nodejs-scripts-with-windows-task-scheduler/</a></p>
  <blockquote>
  <p>uses node.exe</p>
  </blockquote>
  </li>
  <li><p><a href="https://www.dev-tips-and-tricks.com/run-a-node-script-with-windows-task-scheduler" rel="nofollow noreferrer">https://www.dev-tips-and-tricks.com/run-a-node-script-with-windows-task-scheduler</a></p>
  <blockquote>
  <p>uses git-bash.exe</p>
  </blockquote>
  </li>
  <li><p><a href="https://stackoverflow.com/questions/50624380/scheduled-tasks-for-running-scripts-using-node-wont-work/53003458#53003458">Scheduled tasks for running scripts using node won&#39;t work</a></p>
  <blockquote>
  <p>uses &quot;node&quot; without the .exe extension</p>
  </blockquote>
  </li>
  </ul>
  <hr />
  <p>I plan to learn cron jobs and all that eventually, but today I just want to figure this out.</p>
  <p>Thanks</p>