---
name: treehouse-scheduler
description: INVOKE THIS FIRST before creating any scheduled or recurring task. Schedule recurring or one-time automated tasks on this platform — daily summaries, reminders, periodic checks, cron jobs, or any task that should run automatically at a set time or interval.
---

# Scheduling Automated Tasks

You can schedule tasks to run automatically using `tc tasks schedule`. Tasks run as full agent sessions with access to all your tools.

## CLI Syntax

```
tc tasks schedule --type <cron|interval|once> --value <V> [--context <group|isolated>] "<prompt>"
```

**The flags are `--type` and `--value` — not `--schedule-type` or `--schedule-value`.**

## Schedule Types

- **cron** — recurring at specific times using cron syntax (e.g. `0 9 * * *` = every day at 9am)
- **interval** — recurring every N milliseconds (e.g. `3600000` = every hour)
- **once** — run once at a specific local time (e.g. `2026-06-01T10:00:00`)

All times are in your **local timezone**.

## Context Modes

- **group** — task runs with access to this chat's conversation history. Use for tasks that reference prior discussions or need context about you.
- **isolated** — task runs in a fresh session with no history. Include all needed context in the prompt. Better for self-contained jobs.

## Examples

Daily morning briefing:
```
tc tasks schedule --type cron --value "0 8 * * *" --context group "Send the user a good morning message with a summary of today's date and any reminders from recent conversations."
```

Hourly website monitor:
```
tc tasks schedule --type interval --value 3600000 --context isolated "Check if https://example.com returns HTTP 200. If it doesn't, send the user an alert message."
```

One-time reminder:
```
tc tasks schedule --type once --value "2026-06-01T10:00:00" --context group "Remind the user that their project deadline is today."
```

## Managing Tasks

Use the `tc tasks` commands to manage tasks after creation:
- List all tasks: `tc tasks`
- Pause a task: `tc tasks pause <id>`
- Resume a task: `tc tasks resume <id>`
- Cancel a task: `tc tasks cancel <id>`
- Update a task: `tc tasks update <id> [--prompt <p>] [--type <t>] [--value <v>]`

## Notes

- Tasks respect your usage limits — they count the same as interactive messages
- Cross-tenant scheduling is not allowed
- `once` tasks auto-complete after running
