Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 am trying to use the at command to do a specific one time execution. assume that i have a batch file at c:\bat.bat that contains:

%* > d:\out.txt

i also have a Java with path registered in my Windows 7 x64. then i open a CMD prompt as an administrator and try to execute the batch file, like this:

c:\bat.bat java

above command will execute the batch with a 'java' string as a lone parameter. the 'java' then will be passed into the batch and run with output redirection to a specific file, d:\out.txt. the execution runs properly and the out.txt is created and contains some java usage messages.

okay, the problem is, when i am trying to use the at command like:

at 9:10 c:\bat.bat java

the out.txt never created, any idea,.? note: you can try to put any other program as a parameter.

thanks you for your help :)

share|improve this question

By default, scheduled tasks run under the SYSTEM account which probably does not have write-access to the location you're trying to write to d:\out.txt.

share|improve this answer
Will the /interactive parameter help in this case? – Karan Feb 2 '13 at 3:02
no, /interactive doesn't help. i have also see the event log, and found nothing related to the task schedule. i also change the d:\out.txt to c: drive, still not working,. – simaremare Feb 2 '13 at 3:31

try that

at 9:45 cmd /c "c:\bat.bat java"
share|improve this answer

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.