Does anyone have a Windows “at /every:” example to explain how to setup a batch file to run every day

batch-filecommand-line-interfacewindows-server-2003windows-server-2008

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

Best Answer

Running every day:

AT 3:00AM /EVERY:M,T,W,Th,F,S,Su c:\foo.bat