Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Microsoft documentation for the "AT" scheduler command shows that it has an /every: switch to schedule a script to reoccur on specified days. I've done it before, but I can't remember the syntax for that switch. The documentation does not include an example that uses the /every: switch.

So, can you help me write an example "AT" scheduler command to run a batch file on the local machine daily, monday through friday?

Example:

c:\at 12:01am /every: updatestats.bat
share|improve this question
1  
Side note: On recent versions of Windows schtasks can be used as it supports more features of the task scheduler. –  Joey Dec 11 '09 at 18:54

2 Answers 2

up vote 3 down vote accepted

Running every day:

AT 3:00AM /EVERY:M,T,W,Th,F,S,Su c:\foo.bat
share|improve this answer
    
Perfect! Thanks. –  user28765 Dec 11 '09 at 16:53
1  
For some reason this doesn't work in Windows Server 2008 R2 Enterprise for me. Any ideas? He's complaining about an illegal value for the option every. Not even /EVERY:M is working !? –  Smamatti Aug 22 '12 at 8:11

Try:

/every:monday,tuesday,wednesday,thursday,friday
share|improve this answer

Your Answer

 
discard

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