cmd: The "at" command

Windows, like Unix, has an “at” command. It’s basically a command-line interface for Task Scheduler. I use it rather often but haven’t memorized the syntax so I’ve decided to put it here in my blog. Here is example syntax for running a VBS script:

at 12:00 /every:m,t,w,th,f,s,su %SystemDirectory%\cscript.exe C:\scripts\fileFetch.vbs

Here are a few notes to remember about the at service

a. The script will run with the permissions of the user that is used to start the “Task Scheduler” or “at” service. Make sure the user has adequate permissions to Objects you are creating and the directory where you will save your file.
b. Make sure the account that is used to start the at service has “log on as a service” enabled.
c. To delete a schedule task, run the at command and look for its id. Next, run at id /delete. For example: at 1 /delete

Chrissy is a PowerShell MVP who has worked in IT for nearly 20 years, and currently serves as a Sr. Database Engineer in Belgium. Always an avid scripter, she attended the Monad session at Microsoft’s Professional Developers Conference in Los Angeles back in 2005 and has worked and played with PowerShell ever since. Chrissy is currently pursuing an MS in Systems Engineering at Regis University and helps maintain in her spare time. She holds a number of certifications, including those relating to SQL Server, SuSE Linux, SharePoint and network security. She recently became co-lead of the SQL PASS PowerShell Virtual Chapter. You can follow her on Twitter at @cl.

Posted in Windows

Leave a Reply

Your email address will not be published. Required fields are marked *