Overview
Tasks contain the deployment parameters you want to use in different remediation plans.
You can also use tasks to run scripts on your servers, regardless of the Remediation Plan.
When creating a task, you can use a Script, an Execution Line, or both.
Before creating a task, you should add scripts to your library.
| Note: It is recommended to run tasks that have scripts uploaded to JetPatch itself, instead of running it from the server. |
Task Types
There are three types of tasks:
| Task Type | Description |
| User-Created Tasks |
Tasks added by the user to JetPatch. They can be based on JetPatch built-in scripts, user scripts, or not at all (Command Line tasks). |
| Built-In Tasks |
Tasks created by the JetPatch team as part of the product. These tasks cannot be modified or duplicated and should work out of the box. Built-In tasks have a dedicated sign in the interface. Note: The user can create a task based on the same script that the Built-In tasks use. |
| Built-In Service |
A special built-in task that does not use the regular task execution command to the Connector. Each built-in service is a fully dedicated mechanism involving Connector special actions without any interpreter involvement. These tasks can be edited with dedicated settings unique to each service, and cannot be duplicated. Built-In services have a dedicated sign in the interface and a special sign when selected to execute on endpoints. |
Task Library
The Task Library contains the tasks you have created and the built-in tasks created by JetPatch. Built-in Tasks cannot be changed in any way.
- Select System → Tasks from the main menu to view the Library.
- The Search bar in the top-left corner will let you search by Task name only.
- Filter options: Category, Created By, and Script.
- You can view or duplicate tasks by clicking on the action button on the right.
| Note: You are unable to delete a task that was added to a workflow assigned to a remediation plan. |
Create a New Task
- Select System → Tasks from the main menu.
- Click +Add.
- Fill in the relevant details:
- Task Name
- Description
Execution Tab
| Task Source | Description |
| Script |
The task is based on a script with default command execution. Script: Choose the script to run. Note 1: The default execution line is: @file @param1=default1 @param2=default2 Note 2: JetPatch identifies the operating systems the script can run on and allows it to run only on matching endpoints. |
| Command Line |
For stand-alone tasks not based on a script, but on the provided command line. Execution Type: Choose the execution type of the command line. Includes all CLI tools (e.g., Salt, Awk, Puppet). Execution Command: The command that will be executed. Note: The operating system for the command line is not specified, so these tasks are visible on all endpoint types. |
| Both | The task is based on a script with a custom command execution (for scripts that need a different execution line than the default one). |
Configuration Tab
| Setting | Description |
| Timeout | The timeout for the task to run. |
| Note: The "Execute Reboot Procedure" flag has been removed. Reboot behavior is now controlled per exit code via the Exit Code Tab. |
Exit Code Tab
The Exit Code tab displays the exit codes as configured on the selected script (same as in System → Tasks & Scripts → Scripts → Exit Code Tab).
An additional Actions column allows you to define what happens when a specific exit code is received from the task run:
| Action | Description |
| No Action | No action will be performed when this exit code is received from the task run. |
| Set Reboot Suspension | The system will set the endpoint with the exemption: Pending Reboot Suspension. |
| Clear Reboot Suspension | The system will clear the endpoint from the exemption: Pending Reboot Suspension (if it exists). |
Parameters Tab
Relevant only for script-based tasks with parameters. Define each parameter value for execution.
- Click Save.
Run Task
You can run tasks directly from the Management table (Endpoints → Management).
- Select an endpoint and click ACTION.
- Choose Run Task and execute your tasks.
- The progress of the run task can be monitored from the Activities table.
Examples
Example 1: Run a Bash Script on an Endpoint
|
Note: When using bash, there is no need to change the default execution line. Make sure you have added a bash script to your script library ahead of time. |
- Create a new task.
- Choose Script: Start Stop Service Linux (bash script).
- Go to the Parameters tab and insert a value for ActionName and Service Name. For example: start, syslog.
- See the Execution Preview update accordingly.
- Save the task and run it on endpoints.
Example 2: Run a PowerShell Script on an Endpoint
| Note: When using PowerShell scripts, the task source should be changed to Both. |
- Create a new task.
- Change Task Source to Both.
- Choose a PowerShell script with parameters you have uploaded.
- Select Execution Type: PowerShell.
- Enter the following execution command: ./@file @param1 @param2 (as many parameters as needed).
Related Articles
- Scripts
- Built-in services -
- How to execute a Binary Executable File
- Activities
Comments
0 comments
Please sign in to leave a comment.