One of the amazing tool that comes together with Windows is Task Scheduler. By using Task Scheduler, you can schedule the tasks to run daily, weekly, monthly, or at certain times. Although It's easy to configure and create a task, sometime it make you get headache.
Once, I tried to set up the auto upload the file via ftp channel. I created the program and tested it. It's working fine when I run it manually. But It didn't work when I run it by task scheduler. It work perfectly if I choose “Run only when user is logged on”. The problem is that if I choose "Run whether user is logged on or not" option, it cannot run. Then I tested to launch notepad. But cannot be launch. That lead me to go wrong way. Run only when user is logged on I checked everything I may wrong. But everything seen to be correct and I couldn't solve the problem. I googled a lot and tried everything and finally I managed to fix it successfully. I just want to share what I did. If Task Scheduler is not running, you should check following;
After I fixed all of the above, my program can be run by task scheduler as I expected.
Just a normal software developer who love to write code. Developing professional software since 1999. After working in the software industry for many years, I've started my own website to share knowledges and experiences.