AT Command
From Hak5
The AT Command is used in many Hak.5 and fan made hacks/tutorials, it's handy for all sorts of things. The AT command basically allows you to run a command or program at a time or times that you schedule. It's more or less equivalent to the crontab in Unix and Unix-like Operating Systems.
Contents |
Syntax
Format of command line
Show AT jobs currently scheduled to run:
AT
Create an AT job:
AT [\\computername] time [/INTERACTIVE] [/EVERY:day(s) | /NEXT:day(s)] "command"
Delete an AT job:
AT [\\computername] [[id] [/DELETE] | /DELETE [/YES]]
Show help for AT command:
AT/?
Explanation of parameters
\\computername - Specifies the computer to schedule the command on, if omitted the job will be scheduled on the local computer.
time - The time you want the job to run in the format HH:MM.
/interactive - Will allow the job to interact with the desktop of the user logged in at the time the job is run.
/every:day(s) - Run the command on every day(s) of the month of week.
/next:day(s) - Run the command on the next occurrence of the day.
Format of days: Monday = m Tuesday = t Wednesday = w Thursday = th Friday = f Saturday = s Sunday = su or you can specify a specific day of the month.
id - The unique id that AT assigns to each job.
/delete - Will delete the job specified by id. WARNING: If no id is specified this will delete all jobs!!!
/yes - This is used in conjunction with /delete, this will stop any confirmation messages from showing, use with care.
Examples of usage
To run Notepad at 9:30 pm every week day and allowing it to interact with the desktop:
AT 21:30 /EVERY:m,t,w,th,f /INTERACTIVE C:\WINDOWS\notepad.exe
To run Notepad at the next time it's 4:00 am but not allowing it to interact with the desktop:
AT 4:30 /NEXT: C:\WINDOWS\notepad.exe
Hacks that use the AT command
To be done...
Notes
The Task Scheduler service (or the Schedule service on older versions of Windows) must be running to use the AT command.
By default only a Local Administrator or a Domain Administrator can use the AT command.
The AT command is becoming redundant, we should be starting to use the SCHTASKS command instead.
As an alternative, SCHTASKS can also be used through the Windows' GUI in the Control Panel. (Control Panel -> Scheduled Tasks)


