# Automations

Automations run tasks on a recurring schedule without manual launches. Each automation belongs to a single environment and creates normal CoderFlow tasks when it runs.

## Where to Manage

1. Open **Administration -> Environments**.
2. Select an environment.
3. Open the **Automations** tab.

From this tab you can create, edit, enable/disable, run now, view history, and delete automations.

## Creating an Automation

Click **Add Automation** and configure:

- **Name** and optional **Description**
- **Schedule** using the picker:
  - Daily
  - Weekly
  - Monthly (one or more days, 1-28)
  - Recurring (interval + optional time window + optional days)
  - Custom cron expression
- **Run Target**:
  - **Custom instructions** for manual-style tasks
  - **Task template** (from environment templates) with parameter values
  - **Deployment profile** (from environment deployment profiles) with parameter values
- **Agent** for task-based automations:
  - Claude, Codex, or Gemini
  - Optional Claude effort level override
  - Optional Codex reasoning level override
- **Task Name Template** (supports `{{date}}` and `{{datetime}}`) for task-based automations
- **Enabled** toggle

Save to activate the automation.

## Git Authentication for Scheduled Runs

Scheduled automations run as a background system action, not as the interactive user who created them.

- Repository operations for scheduled automation tasks use the configured app/provider identity
- Provider audit logs will show the app/bot identity rather than an individual user
- If a repository or branch policy requires a real user identity, scheduled pushes may still be blocked by the provider

## Schedule Notes

The schedule picker stores a cron expression internally.

Examples:

- Daily at 2:00 AM -> `0 2 * * *`
- Weekly Monday 9:00 AM -> `0 9 * * 1`
- Monthly 1st at midnight -> `0 0 1 * *`
- Monthly 1st and 16th at midnight -> `0 0 1,16 * *`
- Every 30 minutes -> `*/30 * * * *`
- Every 30 minutes, 9 AM-5 PM, weekdays -> `*/30 9-17 * * 1,2,3,4,5`

## Managing Existing Automations

Each row in the Automations table provides:

- **On/Off toggle** to enable or disable scheduling
- **Run Now** to trigger immediately
- **History** to view recent runs and linked tasks
- **Edit** to update configuration
- **Delete** to remove the automation

## Run History

History shows:

- Trigger time
- Trigger source (`manual` or `schedule`)
- Run status
- Link to the generated task or deployment result

Task-based automations can open the main task list filtered by automation. Deployment automations link to the environment's deployment history for the selected profile.

## Task List Integration

Automation-created tasks can be filtered from the main task board with:

- `index.html?automation=<automationId>`

When this filter is active, the task board shows a filter banner. Automation tasks also show an automation badge on task tiles linking back to the automation history view.
