> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tilebox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Client.Jobs.Submit

```go theme={"system"}
func (*JobClient) Submit(
    ctx context.Context,
    jobName string,
    tasks []workflows.Task,
    options ...job.SubmitOption
) (*workflows.Job, error)
```

Submit a job.

## Parameters

<ParamField path="jobName" type="string">
  The name of the job
</ParamField>

<ParamField path="tasks" type="[]Task">
  The root task for the job. This task is executed first and can submit subtasks to manage the entire workflow. A job can have optionally consist of multiple root tasks.
</ParamField>

<ParamField path="options" type="[]job.SubmitOption">
  Options for the job
</ParamField>

## Options

<ParamField path="WithMaxRetries(maxRetries int64)" default="0">
  Set the maximum number of [retries](/workflows/concepts/tasks#retry-handling) for the subtask in case it fails
</ParamField>

<ParamField path="WithClusterSlug(clusterSlug string)" default="">
  The [cluster](/workflows/concepts/clusters#managing-clusters) to run the root task on. If not provided, the default cluster is used.
</ParamField>

## Returns

A job object.

<RequestExample>
  ```go Go theme={"system"}
  job, err := client.Jobs.Submit(ctx,
      "My job",
      []workflows.Task{rootTask},
  )
  ```
</RequestExample>
