Scheduled Tasks In Windows

September 29, 2015 By 0 Comments

Lately I was having some issues with a scheduled task not running correctly in Windows. It was supposed to be a program that ran once a day to collect data, only it was never starting – either on schedule, or manually by running the task. The program runs normally, when not invoked by the task scheduler, so it was clear there was something in there that was causing issues.

Turns out it was the working directory that was causing a problem. While I had set this to the same directory that the executable was located in (as it should be), the fault was the quotes around the path. Normally Windows requires these when the path has a space in it, but here they cause the entire task to crap itself and give up.

TL;DR: Don’t use quotes in working directory paths on Windows.