Skip to main content
The SDK supports running agents on cron schedules. Scheduled agents persist across process restarts and run independently of any client application.

How Scheduling Works

  1. You define a schedule (cron expression + prompt + config)
  2. The SDK stores the schedule and manages execution
  3. At each trigger time a new session is created and the agent is run
  4. Results are stored, and the CLI can post them to a chat through a connector (Telegram, Slack, and others)
Scheduled agents rely on the hub-spoke architecture that is part of ClineCore. The hub runs as a background process on your machine. It starts automatically when needed and persists schedules across restarts.

Creating Schedules Programmatically with Cline SDK

cline.automation reads schedule files from ~/.cline/cron/, reconciles them, ingests events and lists runs. sdk/examples/cron has sample schedule files.

Schedule Wizard with Cline CLI

If you have the Cline CLI installed (npm i -g cline), run cline schedule to open an interactive menu for creating and managing schedules, browsing execution history, and viewing performance statistics.

Creating Schedules with Flags

Scheduling lists the other options, such as --provider and --model.

Managing Schedules

Cron Expression Reference

Use Cases

Daily Standup Summary

Automated Dependency Updates

Codebase Health Report

Concurrency Limits

  • Each schedule runs one execution at a time unless you raise --max-parallel. An execution that comes due while the schedule is busy waits in the queue.
  • The hub runs at most 10 scheduled executions at once across all schedules. ClineCore.create({ automation: { globalMaxConcurrency } }) changes this limit for the SDK’s own scheduler.
  • If the hub was stopped when a run was due, it queues one catch-up run when it starts again, not one for each missed time.

Routing Results

The CLI can post each run’s final reply to a chat through a running connector. Routing Results shows how to set the chat.