[SDK reference](../../index.md) / [Models](../index.md) / [Compute](index.md)

# BatchTaskSpec

**Kind:** class  
**Namespace:** `Egulu.Sdk.Models.Compute`  

What to run. Give `command` (an argument list), `script` (a shell script) or `image` (a container image; `command` is then its arguments), and`arrayCount` to run it many times with `BATCH_TASK_INDEX` set to 0 to arrayCount - 1 (the tasks are named `{name}-{index}`).

## Properties

| Name | Type | JSON name | Description |
|---|---|---|---|
| `ArrayCount` | `int?` | `arrayCount` | Run this many copies, 1 to 5000. |
| `Command` | `List<string>?` | `command` | The program and arguments, run without a shell. At most 64 items. |
| `DependsOn` | `List<string>?` | `dependsOn` | Names of tasks (or array tasks) of the job that must succeed first; if one fails this task is skipped. |
| `Env` | `Models.Compute.BatchTaskSpec_env?` | `env` | Environment variables; at most 64, names of `[A-Za-z_][A-Za-z0-9_]*`. `BATCH_*` names are the platform's. |
| `Image` | `string?` | `image` | A container image to run (needs a container runtime on the node). |
| `MaxRetries` | `int?` | `maxRetries` | How many times a failed attempt is tried again, 0 to 10; 0 when omitted. |
| `Name` | `string?` | `name` | The task's ID within the job: 1 to 40 lowercase letters, digits or hyphens. |
| `OutputFiles` | `List<Models.Compute.BatchFile>?` | `outputFiles` | Files sent to buckets when the task has succeeded. |
| `ResourceFiles` | `List<Models.Compute.BatchFile>?` | `resourceFiles` | Files fetched from buckets before the task runs. |
| `Script` | `string?` | `script` | A shell script, run with `sh`. At most 64 KiB. |
| `TimeoutSeconds` | `int?` | `timeoutSeconds` | Seconds an attempt may run, 1 to 86400; 3600 when omitted. |
