Windows Server 2008 Task Scheduler

Recently I was trying to set up a scheduled task in Windows Server 2008. I set it up to run later in the day and everything seems self explanatory. The next morning I checked to see if the task ran fine or not and I found out that it “ran” but it technically didn’t.

In the history of the scheduled task it shows that it executed the task, but when I checked nothing had changed. I double checked all of my settings and everything seemed fine. I even executed the batch file in the cmd prompt and it worked just dandy.

I noticed a field under the action tab when you are editing or creating an action, it says ‘Start in (Optional)’ I decided to try it and put in the directory of where the batch file was located. I then ran the task and it magically started working. Now, I know this doesn’t make complete sense because you already have to browse and locate the batch file under ‘Programs/Scripts’  But hey, it wouldn’t be Microsoft if it was made easy.