How to Set Up Scheduled Tasks in Claude Code

Scheduled tasks let Claude Code run prompts on a recurring cadence – daily, weekly, hourly – without you being in the conversation. Each run starts a fresh instance, reads your project files, executes the prompt, and ends. Think of them as lightweight cron jobs that understand your codebase.

CLI Setup

In the Claude Code terminal, use the /schedule command:

/schedule daily at 9am "Check for new YouTube videos and summarize them"

You can also create them programmatically through the cron tools:

cron_create: {
  "schedule": "0 9 * * *",
  "prompt": "Check for new YouTube videos and summarize them"
}

The schedule uses standard cron expressions:

*  *  *  *  *
|  |  |  |  |
|  |  |  |  +-- day of week (0-7, Sun=0 or 7)
|  |  |  +---- month (1-12)
|  |  +------- day of month (1-31)
|  +---------- hour (0-23)
+------------- minute (0-59)

Common patterns:

Manage your tasks with:

cron_list    -- see all scheduled tasks
cron_delete  -- remove a task by ID

Desktop App Setup

In the Claude Code desktop app (Co-work interface):

  1. Open Scheduled Tasks in the sidebar

  2. Click New Task

  3. Fill in the fields:

    • Name – a short label for the task
    • Description – what it does (helps you remember later)
    • Prompt – the instruction Claude Code will execute each run (no need to include /schedule)
    • Schedule – pick daily, weekly, hourly, or write a custom cron expression
    • Model – which Claude model to use
    • Project folder – the working directory for the task
  4. Save. The task runs on schedule as long as the app is open.

How It Works

Each scheduled run:

  1. Starts a fresh Claude Code instance
  2. Loads the project folder and reads relevant files (including CLAUDE.md and skills)
  3. Executes the prompt
  4. Ends the session

Tasks automatically pick up your skills based on their descriptions. If your prompt says “repurpose this content for Twitter” and you have a content repurposing skill, Claude Code will use it.

Scheduled Tasks vs Loops

These solve different problems:

Loops Scheduled Tasks
Lifetime Current session only Persists across sessions
Max duration 3 days, then expires Runs indefinitely
Missed runs Skipped permanently Catches up when app reopens
Instance Same session, same context Fresh instance each run
Created in CLI only CLI or desktop app

Use loops for short-term monitoring during active work – watching an inbox for a few hours, tracking a deploy.

Use scheduled tasks for routines – daily reports, weekly summaries, recurring checks.

Limitations

Practical Examples

Daily standup prep:

/schedule daily at 8:30am "Review git log from the last 24 hours,
summarize what changed, and list any open PRs that need review"

Weekly dependency check:

/schedule weekly on Monday at 9am "Run mix hex.outdated,
summarize which dependencies have updates, and flag any
with security advisories"

Hourly monitoring:

/schedule every 2 hours "Check the error logs for any new
exceptions and summarize patterns"

Content pipeline:

/schedule daily at 7am "Check my YouTube channel for new videos
published in the last 24 hours. For each new video, run my
content repurposing skill to create a newsletter draft and
three tweet variations. Save outputs to asset/content/"

The key insight: scheduled tasks turn Claude Code from something you talk to into something that works on its own schedule. Set them up once, let them run.