From LedHed's Wiki
Jump to: navigation, search
 
Line 37: Line 37:
  
  
[[Category:Windows]]
+
 
 +
[[Category:Remote_Admin_Tricks]]

Latest revision as of 07:06, 15 May 2013

The at command is kind of like a scheduled task or cron job.

Usage:

at time command

Example:

at 23:00 chkdsk c: /f

This will run a disk check at 11:00pm


Scheduling commands on Remote Systems

at \\REMOTE_HOST 12:00 del c:\log.txt

This will delete c:\log.txt at noon.


Viewing Job Schedule

Just type at.

at


Deleting Scheduled Commands

at ID /delete

Where ID is the job number, which can be obtained by running the at command as stated above.


Interactive Jobs

If you want the scheduled command to interact with the logged in user then pass the /interactive option.

at \\REMOTE_HOST 15:30 /INTERACTIVE "%ProgramFiles%\Windows Media Player\wmplayer.exe" fart.mp3

This will play a fart sound on the remote host at 3:30pm.  ;)

An example of when you would want to do this can be seen in this RickRoll article.