For scheduling and automatic execution of tasks in the Windows environment, the standard Task Scheduler tool is provided, which ensures the execution of previously prepared tasks at a specific time, or when certain events occur, either once or at intervals, in the context of operating system or user accounts. In other words, using the Task Scheduler, you can schedule or perform a certain event, perform previously prepared actions, for example, check for updates, synchronize the clock on the time-server when any user logs on, turn off or restart the computer, create a system restore point, etc. Starting from Windows Vista, Task Scheduler has become the main system maintenance tool, without which its normal operation is impossible. To manage scheduled task remotely in a graphical user interface environment, the Microsoft Management Console (MMC) with the taskschd.msc module or the Schtask.exe command line utility can be used.
The schtasks.exe utility is a standard scheduler management tool and allows you to create, delete, modify and poll scheduled tasks on a local or remote computer.
The user can create tasks or manage tasks on a remote computer using the task scheduler user interface for connecting to a remote computer. When this is necessary to know the name or IP-address of the computer which you want to connect. This howto helps to create scheduled task remotely.
1. Run Task Scheduler with Windows Interface
Run Task Scheduler if it is not already running.
To run Task Scheduler using the Windows interface:
- Click the Start button.
- Select Control Panel.
- Choose System and its maintenance.
- Select Administration.
- Double-click Task Scheduler.
To start Task Scheduler using the command line:
- Open a command window. To do this, on the Start menu, select All Programs, Accessories, and Command Prompt.
- At the command prompt, type
2. Select Option Connect to Another Computer
Make sure that the Task Scheduler node is selected in the console tree.
In the Actions pane, click Connect to another computer. The Select Computer dialog box appears.
3. Select the Other Computer Option in Task Scheduler
- In the Select Computer dialog box, select the Another computer option.
- Enter the name or IP address of the remote computer in the text box next to the Other computer switch or click the Browse button to find the remote computer.
- (Optional) When connecting to a remote computer, you can use the credentials of another user. Check the Connect as another user box and click the Select User button. Enter the required username and password.
- After you select a remote computer, click OK in the Select Computer dialog box.
4. You Are Connected to a Remote Computer
You are connected to a remote computer. Now you can create tasks or manage tasks (start, end, activate, disable, create, delete, view, import and export tasks) on a remote computer in the same way as if the task scheduler was connected to a local computer.
5. Create and Manage a Task on a Remote Computer Using the Command Line
Open a command prompt. To do this, on the Start menu, push Windows+R and type: cmd.exe
6. Use the Schtasks.Exe Tool
To create a task or manage it, use the Schtasks.exe tool, specifying the name or IP address of the remote computer to which you want to connect — in the /S system argument, the username used to connect to the remote computer — in the / u username argument, and the password The corresponding username is in the / P argument of the password. To get help on using the Schtasks.exe tool, enter one of the following commands:
schtasks /Create /?
schtasks /Run /?
schtasks /End /?
schtasks /Delete /?
schtasks /Change /?
Consider Using Action1 to Create Scheduled Task Remotely if:
- You need to perform an action on multiple computers simultaneously.
- You have remote employees with computers not connected to your corporate network.
Action1 is a cloud-based platform for patch management, software deployment, remote desktop, software/hardware inventory, endpoint management and endpoint configuration reporting.