Class Exec
java.lang.Object
org.openhab.core.model.script.actions.Exec
This class provides static methods that can be used in automation rules for
executing commands on command line.
- Author:
- Pauli Anttila
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidexecuteCommandLine(String... commandLine) ExecutescommandLine.static StringexecuteCommandLine(Duration timeout, String... commandLine) ExecutescommandLine.
-
Constructor Details
-
Exec
public Exec()
-
-
Method Details
-
executeCommandLine
Executes
commandLine.A possible
IOExceptiongets logged but no further processing is done.- Parameters:
commandLine- the command line to execute
-
executeCommandLine
Executes
commandLine.A possible
IOExceptiongets logged but no further processing is done.- Parameters:
timeout- timeout for execution, if null will wait indefinitelycommandLine- the command line to execute- Returns:
- response data from executed command line
-