# Common Options

When creating a Task, the required and optional inputs will vary significantly by the Task type. However, there are options which are common to Tasks of all types.

## Target Options

When creating a Task, users can select a target to perform the execution. Some Task types allow for any of the three execution targets listed below and some will limit the user to two or just one. The table in the next section lists the available execution targets for each Task type.

- **Resource:** A HPE Morpheus Enterprise-managed Instance or server is selected to execute the Task
- **Local:** The Task is executed by the HPE Morpheus Enterprise appliance node
- **Remote:** The user specifies a remote box which will execute the Task

## Execute Options

- **Continue on Error:** When marked, Workflows containing this Task will continue and will remain in a successful state if this Task fails
- **Retryable:** When marked, this Task can be configured to be retried in the event of failure
- **Retry Count:** The maximum number of times the Task will be retried when there is a failure
- **Retry Delay:** The length of time (in seconds) HPE Morpheus Enterprise will wait to retry the Task
- **Allow Custom Config:** When marked, a text area is provided at Task execution time to allow the user to pass extra variables or specify extra configuration. See the next section for an example.

## Source Options

Task configuration code may be entered in a number of ways depending on the Task type. Changing the SOURCE type will often update the available fields in the Task modal to accommodate the selected sourcing. Not every Task type supports every sourcing type listed here.

- **Local:** The Task configuration code is written directly in HPE Morpheus Enterprise in a large text area. HPE Morpheus Enterprise includes syntax highlighting for supported Task languages for easier debugging and script writing
- **Repository:** Source the Task configuration code from an integrated Git or Github repository. This requires a pre-existing integration with a Github or other Git-based repository. See the [relevant integration guides](https://docs.morpheusdata.com/en/latest/integration_guides/Deployments/deployment.html) for full details on creating such an integration. Specify the path to the appropriate file through the WORKING PATH field. The appropriate branch may also be specified (if a branch other than ‘main’ is required) in the BRANCH/TAG field. To reference a tag from this field, use the following syntax: `refs/tags/<tag-name-here>`. Unless otherwise specified, Task config is sourced fresh from the repository each time the Task is invoked which ensures the latest code is always used
- **URL:** For Task configuration that can be source via an outside URL, specify the address in the URL field

## Allow Custom Config

When “Allow Custom Config” is marked on a Task, the user is shown a text area for custom configuration when the Task is executed manually from the Tasks List Page. If the Task is to be part of an Operational Workflow, mark the same box on the Workflow rather than on the Task to see the text area at execution time. This text area is inside the “Advanced Options” section, which must be expanded in order to reveal the text area. Within the text area, add a JSON map of key-value pairs which can be resolved within your automation scripts. This could be used to pass extra variables that aren’t always needed in the script or for specifying extra configuration.

## Example JSON Map:

```
```
{"key1": "value1",  
"key2": "value2",  
"os": "linux",  
"foo": "bar"}
```
```

When the Task is executed, these extra variables would be resolved where called into the script such as in the following simple BASH script example:

```
```
echo "<%=customOptions.os%>"  
echo "<%=customOptions.foo%>"
```
```

The above example would result in the following output:

```
```
linux  
bar
```
```
