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:
-
0 9 * * *– every day at 9:00 AM -
0 9 * * 1– every Monday at 9:00 AM -
0 */2 * * *– every 2 hours -
30 8 1 * *– 8:30 AM on the 1st of each month
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):
-
Open Scheduled Tasks in the sidebar
-
Click New Task
-
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
-
Save. The task runs on schedule as long as the app is open.
How It Works
Each scheduled run:
- Starts a fresh Claude Code instance
-
Loads the project folder and reads relevant files (including
CLAUDE.mdand skills) - Executes the prompt
- 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
- The desktop app must be open and your machine must be on for scheduled tasks to fire
- If your machine was off during a scheduled run, the task catches up when you reopen the app
- Each run starts fresh with no memory of previous runs (unless you write state to files)
- Only available in the desktop Claude Code app, not in terminal-only or VS Code extension modes
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.