The command: "SCHTASKS /End /?" is on Windows 12, 11, 10, .. , MS Server 2025, 2022, 2019, .. available
This command ends a process named “YourProgram.exe”. The
`/F` parameter forces the process to terminate immediately.
The
`SCHTASKS /End` command is actually used to end a running scheduled task. Here are examples of usage:
Example 1: Ending a scheduled task on the local computer:
SCHTASKS /End /TN "MyTask"
This command ends the scheduled task named MyTask on the local computer.
Example 2: Ending a scheduled task on a remote computer:
SCHTASKS /End /S "RemoteComputer" /U "Username" /P "Password" /TN "MyTask"
This command terminates the scheduled task named
"MyTask" on the remote computer
"RemoteComputer" using the specified credentials (
`Username` and
`Password`).
Hints:
- The
`/TN` parameter is used to specify the task path or task name. Replace
"MyTask" with the actual name or path of your scheduled task.
- The
`/S` parameter is used to specify the remote computer. Replace
"RemoteComputer" with the actual name or IP address of the remote computer.
- The
`/U` and
`/P` parameters are used to specify the credentials for running on a remote computer.
These examples are intended to give you an idea of ??how the
`SCHTASKS /End` command can be used in different scenarios. Depending on your specific requirements, the parameters may vary. Use
`SCHTASKS/?` for a complete list of options and parameters. Note that stopping a scheduled task can have an immediate impact, so you should ensure that the task is configured correctly.
Example 3:
If you want to kill a scheduled task, you can use the
`taskkill` command instead. Here is an example:
taskkill /F /IM "YourProgram.exe"