Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have batch file that need to run every day at 9 AM and create log. batch file works fine manually (by clicking it or from command line). However, When i set up the task by using task scheduler, it fails to run. (cmd.exe quickly shows up and shuts down and task is complete. (@ task scheduler log) However, no log has been created. I also tried putting pause in my program to hope that my program is being executed, but sadly it isn't.

Can anyone tell me what is the solution to this? Thanks in advance.

share|improve this question
Is it set to run regardless if the user is logged in? Also, like MDMarra mentioned, verify which user the task is running under. This greatly impacts the ability of the task to run successfully. What happens if you run the task manually from the GUI? – MikeAWood Jan 13 '13 at 23:10

By default, scheduled tasks run as SYSTEM. It sounds like SYSTEM doesn't have permission to create the file in the specified location.

You can use psexec -s yourScript.bat to manually run a batch file as SYSTEM to test this with. You can grab the latest version of psexec here.

share|improve this answer

Specify the Start In location.

enter image description here

share|improve this answer
I know this answer is old, but this fixed my issue. I'm not sure if because my batch script is on a different drive (E:) had anything to do with it. Thanks! +1 – etm124 Mar 7 '13 at 20:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.