---
title: "JobClient.submit"
description: "Submit a job."
image: "https://tilebox.com/images/tilebox-docs-social-preview.png"
---

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

# JobClient.submit

import { Fragment } from "astro/jsx-runtime";

import ApiReference from "@docs/components/ApiReference.astro";

import ParamField from "@docs/components/ParamField.astro";

```python
def JobClient.submit(
  job_name: str,
  root_task_or_tasks: Task | list[Task],
  cluster: ClusterSlugLike | list[ClusterSlugLike] | None = None,
  max_retries: int = 0
) -> Job
```

Submit a job.

## Parameters

**job_name**

type: str

The name of the job.

**root_task_or_tasks**

type: Task | list[Task]

The root task or root tasks for the job. Root tasks execute first and can submit subtasks to compose the workflow.

**cluster**

type: ClusterSlugLike | list[ClusterSlugLike] | None

The [cluster slug](/docs/workflows/concepts/clusters#managing-clusters) or cluster object for the root task. When submitting multiple root tasks, pass one cluster or a list with one cluster per task. If not provided, the default cluster is used.

**max_retries**

type: int

The maximum number of [retries](/docs/workflows/concepts/tasks#retry-handling) for the root task or tasks. Defaults to 0.

<h2 id="request-example">Usage example</h2>

```python
from my_workflow import MyTask

job = job_client.submit(
    "my-job",
    MyTask(
        message="Hello, World!",
        value=42,
        data={"key": "value"},
    ),
)
```

Source: https://tilebox.com/docs/api-reference/python/tilebox.workflows/JobClient.submit/index.mdx
