Super User is a question and answer site for computer enthusiasts and power users. 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

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

05:06 PM

Sat 10/02/2010

Status ID   Day                     Time          Command Line
Error   1   Each S                  5:07 PM       dir

05:08 PM


What am I missing ?

share|improve this question
AT.EXE is only included for backwards compatibility with NT4. Use SCHTASKS instead. – paradroid Oct 2 '10 at 7:25
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

You must log in to answer this question.

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