title: Write a batch file to run a node.js file located in another directory
body: <p>In Windows 10, I have created a scheduled task using <strong>SCHTASKS</strong> command to run a node.js file in every 10 minutes using a <code>.bat</code> file. I have used git bash to write that command.</p>
  
  <p>Here is my SCHTASKS command: </p>
  
  <pre><code>schtasks //Create //sc minute //mo 10 //tn "Repeat_10Check" //tr \\runnode.bat
  </code></pre>
  
  <p>My <code>.bat</code> file is located in root directory i.e. <strong>C:\Users\username</strong>. </p>
  
  <p>My <code>.bat</code> file's name is <strong>runnode.bat</strong> </p>
  
  <p>I want to run <strong>example.js</strong> file which is located in <strong>F:\Nodejs\project\subfolder</strong> directory, using that <code>.bat</code> file by running the following command: </p>
  
  <pre><code>SCHTASKS //RUN //TN "Repeat_10Check"
  </code></pre>
  
  <p>Normally in git bash i would write following command to run a node.js file: </p>
  
  <pre><code>cd ../../../F/Nodejs/project/subfolder
  node example.js
  </code></pre>
  
  <p>What should i write in <strong>runnode.bat</strong> to execute those command using the batch file ?</p>