ExecuteScript
Task to execute Python scripts.
Task version: 1.2.0
Required Frends version: 5.7+
Required .NET version: 8.0
Compatible Agents: Crossplatform
Task Parameters
IsPreparationNeeded : Boolean
Defines whether the preparation script is needed to run before the main script.
Default: False
Example: false
PreparationScriptPath : String
Path to a script that should be run before a main script. Script can be .ps1 on Windows or .sh on Linux.
You can install here any dependencies that your main script needs (e.g. pip install -r requirements.txt; pip install numpy),
move to a specific directory to execute the main script from there (e.g. cd /home/user/scripts),
setup virtual environment (e.g. python -m venv venv; source venv/bin/activate) etc.
Default: -
Example: /path/to/script.sh
ExecutionMode : ExecutionMode
Defines how script is provided.
Possible values:
File: Defines how script is provided.Inline: Defines how script is provided.
Default: 1
Example: File
ScriptPath : String
Path to the python script file.
Default: -
Example: /path/to/script.py
Code : String
Inline python script to execute.
Default: -
Example: import sys; print(f'Hello, {sys.argv[1]}!')
Arguments : String[]
Arguments provided to the script.
Default: -
Example: ['MyName']
ThrowErrorOnFailure : Boolean
Whether to throw an error on failure.
Default: True
Example: false
ErrorMessageOnFailure : String
Overrides the error message on failure.
Default: -
Example: Custom error message
Task Result
Success : Boolean
Indicates if the task completed successfully.
Example: true
ExitCode : Int32
ExitCode returned by the process. 0 indicates success.
Example: 0
Error : Error
Error that occurred during task execution.
Example: object { string Message, Exception AdditionalInfo }
StandardOutput : String
Output written to standard output (stdout) by the process.
Example: Hello, World!
StandardError : String
Error output written to standard error (stderr) by the process.
Example: File not found
Task Changelog
Changelog for Task Frends.Python.ExecuteScript.
[1.2.0] - 2026-07-24
Changed
Updated copyright information to comply with Frends standards.
[1.1.0] - 2025-12-05
Changed
Add more specific error message when python is not installed or not found in PATH.
[1.0.0] - 2025-09-11
Changed
Initial implementation
Last updated
Was this helpful?

