NetAt
NetAt is a command-line utility in Microsoft Windows operating systems that allows users to schedule commands and programs to run at specified times and dates. It is part of the Windows Resource Kit Tools and is not included by default in Windows installations. NetAt is particularly useful for automating tasks that need to be performed at specific intervals or times, such as running backups, updating software, or executing maintenance scripts.
The syntax for using NetAt is straightforward. To schedule a task, users can use the following command
netat [\\computername] [/yes | /no] time [/every:date[,...] | /next:date[,...]] "command"
Here's a breakdown of the parameters:
- \\computername: Specifies the name of the remote computer on which the task is to be scheduled.
- /yes or /no: Specifies whether to display additional confirmation when scheduling the task.
- time: Specifies the time at which the command is to run. The time can be in 24-hour
- /every:date[,...]: Specifies that the task should be repeated on the specified days of the week or
- /next:date[,...]: Specifies that the task should be run once on the specified date.
- "command": The command or program to be executed.
For example, to schedule a task to run a backup script every Monday at 2 AM, the
netat 2:00AM /every:MON "C:\path\to\backup.bat"
To list all scheduled tasks, users can use the command:
To delete a scheduled task, users can use the command:
where "id" is the identifier of the task to be deleted.
NetAt is a powerful tool for automating tasks in Windows environments, but it requires careful use