EndTask
- Last UpdatedOct 29, 2026
- 1 minute read
EndTask is a built-in function that stops a specified execution task or runtime module that is currently running.
|
Function |
Group |
Execution |
String Exp. |
Windows |
Windows Embedded |
IoT View |
Thin Clients |
Mobile Access |
|---|---|---|---|---|---|---|---|---|
|
EndTask |
Module Activity |
Asynchronous |
No |
Supported |
Supported |
Not supported |
Executed on Server |
Executed on Server |
Syntax
EndTask(strTask)
EndTask ( { strTask | " { BGTask | Core | DBSpy | XDB | Driverdrivername | LogWin | MobileAccess | OPCClient | OPCUAClient | OPCUAServer | OPCServer | TCPClient | TCPServer | Viewer } " } )
strTask
The name of the task or module to stop (must be one of the following):
|
Value |
Description |
|---|---|
|
BGTask |
Background Task |
|
Core |
Core Runtime |
|
DBSpy |
Watch |
|
XDB |
Database/ERP |
|
Driverdrivername |
Communication Driver (for the specified driver) |
|
LogWin |
LogWin |
|
MobileAccess |
Mobile Access |
|
OPCUAClient |
OPC UA Client |
|
OPCUAServer |
OPC UA Server |
|
OPCServer |
OPC DA Server |
|
TCPClient |
TCP/IP Client |
|
TCPServer |
TCP/IP Server |
|
Viewer |
Viewer |
For more information, see Runtime Tasks.
Return value
This function returns one of the following possible values:
|
Value |
Description |
|---|---|
|
0 |
Failure |
|
1 |
Success |
Examples
Stop the MOTCP driver:
EndTask("DriverMOTCP")
Stop the Viewer module, which is used to view the local project runtime:
EndTask("Viewer")