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

# AutomationClient.create_cron_automation

```python theme={"system"}
def AutomationClient.create_cron_automation(
    name: str,
    task: CronTask,
    cron_schedules: str | list[str],
    cluster: ClusterSlugLike | None = None,
    max_retries: int = 0,
) -> AutomationPrototype
```

Create an automation that submits a task on one or more cron schedules.

## Parameters

**name** `str` *required*

Name of the automation to create.

**task** `CronTask` *required*

Task to run when the automation is triggered.

**cron\_schedules** `str | list[str]` *required*

Cron schedule or schedules that trigger the automation.

**cluster** `ClusterSlugLike | None`

Cluster to run the task on. If not provided, the default cluster is used.

**max\_retries** `int`

Maximum number of retries for the task. Defaults to `0`.

## Returns

The created automation prototype.

```python Python theme={"system"}
automation = client.automations().create_cron_automation(
    name="daily-index-refresh",
    task=RefreshIndex(),
    cron_schedules="0 2 * * *",
    cluster="default",
)
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.