DaedTech

Stories about Software

By

Scheduled Task Problems And Solutions in Windows 7

This is going here for my own sake as much as anything. I’ve been banging my head against a wall for a bit now, trying to figure out why I can’t get a scheduled task to run properly in Windows 7. Two things were going wrong. The first one was that I couldn’t get the start-in setting to work properly. This is neatly explained and addressed in this post.

Long story short, unlike everywhere else in Windows, the “start-in” text box randomly doesn’t demand or even support quotes around directory names with spaces in the paths. So, just remove the spaces.

Second issue I was having was that I was running a task to execute a program I had written that reads an XML config file to point it to files to use. One of these files was addressed by a mapped network drive. This worked fine when I ran the actual executable, but after a lot of bad noise and experimenting, I discovered that it wouldn’t work with the scheduled task. For the scheduled task, I had to use the UNC path to the file in my XML configuration file. I can only speculate that this has something to do with the scheduler not being tightly coupled enough to owning user to share network drives or something.

In the end, doesn’t matter. It’s kind of weird, but for anyone who finds themselves in that edge-case situation, try dealing with UNC exclusively.