1

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 :)

2 Answers 2

1

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.

2
  • Will the /interactive parameter help in this case?
    – Karan
    Commented Feb 2, 2013 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
    Commented Feb 2, 2013 at 3:31
0

try that

at 9:45 cmd /c "c:\bat.bat java"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .