Chrome won't open from batch file in Windows Task Scheduler
<p>I have a batch file that opens a webpage in chrome, and then moves and renames a file that is downloaded from the website. The batch file works when I manually run it. The file does not work when I set the file to run in the windows task scheduler</p>

<pre><code>set date=%DATE:~10,4%_%DATE:~4,2%_%DATE:~7,2%
chrome "http://www.example.com/download_page" &gt;&gt;debug.log 2&gt;&amp;1
timeout 10
move "C:\Users\user\Downloads\export.csv" "C:\path\to\moved\file%date%.csv" &gt;&gt;debug.log 2&gt;&amp;1
</code></pre>

<p>Here is the error message that shows up in debug.log</p>

<blockquote>
  <p>[21396:15752:0317/101540:ERROR:process_singleton_win.cc(335)] Lock
  file can not be created! Error code: 32
  [21396:15752:0317/101540:ERROR:chrome_browser_main.cc(1356)] Failed to
  create a ProcessSingleton for your profile directory. This means that
  running multiple instances would start multiple browser processes
  rather than opening a new window in the existing process. Aborting now
  to avoid profile corruption.</p>
</blockquote>