# Configure cron automations

Use cron automations when a workflow should run on a schedule, such as hourly catalog checks, daily quality-control jobs, or recurring data processing.

Tilebox automations submit workflow jobs when their trigger condition matches. A runner on the target cluster still needs to execute the submitted tasks.

## Define the automation task

Create a task that can run from a scheduled trigger.

```python title="Python"
from tilebox.workflows import ExecutionContext
from tilebox.workflows.automations import CronTask


class DailyCatalogCheck(CronTask):
    def execute(self, context: ExecutionContext) -> None:
        context.logger.info("Running daily catalog check", trigger=str(self.trigger))
```

## Register the cron automation

Use the automation client to register a schedule and target cluster.

```python title="Python"
from tilebox.workflows import Client

client = Client()
automations = client.automations()

automations.create_cron_automation(
    "daily-catalog-check",
    DailyCatalogCheck(),
    cron_schedules=["0 6 * * *"],
)
```

## Keep a runner available

The automation submits jobs. It does not execute them by itself. Start a runner that can execute the task identifier.

```python title="Python"
runner = client.runner(tasks=[DailyCatalogCheck])
runner.run_forever()
```

## Next steps

[Cron triggers](/docs/workflows/automations/cron)

Read the full cron automation reference.

[Monitor workflow runs](/docs/guides/operations/monitor-workflow-runs)

Inspect jobs created by automations.
