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

# Schedules

> Service API endpoints for task reminder schedules.

Base URL: `http://localhost:3100`

## List schedules for a task

```bash theme={null}
GET /tasks/:id/schedules
```

```bash Example theme={null}
curl http://localhost:3100/tasks/42/schedules
```

## Create a schedule

```bash theme={null}
POST /tasks/:id/schedules
```

<ParamField body="type" type="string" required>
  Schedule type: `one_time`, `interval`, `weekly`, `monthly`
</ParamField>

<ParamField body="fire_at" type="string">
  ISO 8601 datetime for one-time schedules
</ParamField>

<ParamField body="interval_days" type="number">
  Repeat interval in days (for `interval` type)
</ParamField>

<ParamField body="day_of_week" type="number">
  Day of week 0-6 (for `weekly` type)
</ParamField>

<ParamField body="day_of_month" type="number">
  Day of month 1-31 (for `monthly` type)
</ParamField>

<ParamField body="time" type="string">
  Time of day in HH:MM format (for `weekly` and `monthly`)
</ParamField>

```bash Example — one-time theme={null}
curl -X POST http://localhost:3100/tasks/42/schedules \
  -H "Content-Type: application/json" \
  -d '{"type": "one_time", "fire_at": "2025-03-15T09:00:00Z"}'
```

```bash Example — interval theme={null}
curl -X POST http://localhost:3100/tasks/42/schedules \
  -H "Content-Type: application/json" \
  -d '{"type": "interval", "interval_days": 3}'
```

## Update a schedule

```bash theme={null}
PATCH /tasks/:id/schedules/:scheduleId
```

## Delete a schedule

```bash theme={null}
DELETE /tasks/:id/schedules/:scheduleId
```

```bash Example theme={null}
curl -X DELETE http://localhost:3100/tasks/42/schedules/7
```
