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.

Note: The at command has been deprecated. For modern systems, it is recommended to use schtasks.exe or the PowerShell *-ScheduledTask cmdlets. This post is preserved for historical context.

Here is example syntax for running a VBS script:

1at 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:

  • 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.
  • Make sure the account that is used to start the at service has "log on as a service" enabled.
  • To delete a schedule task, run the at command and look for its id. Next, run at id /delete. For example: at 1 /delete.