Now the Windows Task Scheduler has been a source of incredible automation power. It allows me to quickly create tasks that I can run on my server or desktop ranging from database processing apps that help optimize searches to simple file ftp uploading services.
Problem
My last attempt at a "automated process" was the source of my recent caffeine crash... The application file (.exe) was stored in a directly where it was expecting to find the files it was responsible for uploading to the remote ftp server. If there were any files, those files get uploaded and moved to a processed folder. Now for the life of me I could not get the application working. If I manually double-clicked on the application file it worked, but if I tried from the Task Scheduler, nothing!!The solution has to do with a simple location mix up... It seems like the Task Scheduler framework takes the application and creates a unique user copy stored in some obscure place that no human can find, which means that for applications that don't have a specific location requirement, everything works fine. BUT should your application reference directory structures based on where it is stored, you are going to find a problem...
Solution
The solution is as simple as adding the directory where you want the application file to run from in the "Start in" text box. A note about the location is that it must NOT contain any quotation marks (i.e. ""). Below I have added a screen shot of the place to add the start location.
And that should get your application running from the right start location so that it has all the correct directory references.
No comments:
Post a Comment