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
set date=%DATE:~10,4%_%DATE:~4,2%_%DATE:~7,2%
chrome "http://www.example.com/download_page" >>debug.log 2>&1
timeout 10
move "C:\Users\user\Downloads\export.csv" "C:\path\to\moved\file%date%.csv" >>debug.log 2>&1
Here is the error message that shows up in debug.log
[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.