Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

On Windows XP I'm trying to add a job like this:

at 17:07 /every:s dir

I expect dir to be executed every Saturday at 17:07, however I don't see anything happens in the command line window.

Here is the log:

D:\temp>at 17:07 /every:s dir
Added a new job with job ID = 1

D:\temp>time/t
05:06 PM

D:\temp>date/t
Sat 10/02/2010

D:\temp>at
Status ID   Day                     Time          Command Line
-------------------------------------------------------------------------------
Error   1   Each S                  5:07 PM       dir

D:\temp>time/t
05:08 PM

D:\temp>

What am I missing ?

share|improve this question
1  
AT.EXE is only included for backwards compatibility with NT4. Use SCHTASKS instead. –  paradroid Oct 2 '10 at 7:25
add comment

1 Answer

up vote 1 down vote accepted

From the Microsoft documentation page for the 'at' command,

To run a command that is not an executable (that is, .exe) file,
precede the command with cmd /c to load Cmd.exe as follows:

cmd /c dir > c:\test.out 

Also as their example shows,
if you want the 'dir' output to be usable, you should redirect it to some file.


Further, like the comment on your question describes, the documentation page notes,

Schtasks is a more powerful superset command-line scheduling tool and includes all the functionality found in the 'at' command-line utility. Use schtasks instead of at for all command-line scheduling tasks.

share|improve this answer
    
Thanks a lot !! –  Misha Moroshko Oct 2 '10 at 7:38
add comment

Your Answer

 
discard

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.