title: Scheduling node.js commands on Windows with .bat
body: <p>I am new to running <strong>node.js</strong> on Windows. After installing, I installed <strong>pageres-cli</strong> and <strong>electroshot</strong> and have been playing with capturing screenshots of websites.</p>
  
  <p>I’m able to successfully use pageres via a CMD prompt. Like this:</p>
  
  <pre><code>d:\&gt;pageres [ https://www.google.com/search?q=stackoverflow ] [ www.bing.com/search?q=stack+overflow ] --filename="&lt;%= url %&gt;_&lt;%= date %&gt;_&lt;%= time %&gt;" --format=jpg --delay=3 --css="a[href*='stackoverflow.com'] {background-color: yellow; color: #7d0000;}"
  </code></pre>
  
  <p>This works beautifully. However, I want to capture these screenshots on a daily basis. So, I thought I could create a .bat file and schedule it. However, if I attempt to run pagers from inside a .bat file, it fails.</p>
  
  <p>I must be missing an obvious step, but my Google-fu has failed me.</p>
  
  <p>Is there some other method of calling this module other than a batch file that will allow me to automate this with Windows Scheduler?</p>