Build This Now
Build This Now
What Is Claude Code?Claude Code InstallationClaude Code Native InstallerYour First Claude Code Project
Claude Code Best PracticesClaude Code on a VPSGit IntegrationClaude Code ReviewClaude Code WorktreesClaude Code Remote ControlClaude Code ChannelsClaude Code Scheduled TasksClaude Code PermissionsClaude Code Auto ModeFeedback LoopsTodo WorkflowsClaude Code TasksProject TemplatesClaude Code Pricing and Token Usage
Get Build This Now
speedy_devvkoen_salo
Blog/Handbook/Workflow/Claude Code Scheduled Tasks

Claude Code Scheduled Tasks

Desktop tasks for durable automation, CLI /loop for session polling, and the real patterns teams run against error logs, briefings, and PRs.

Problem: You keep opening a new session every morning to type the same "check error logs" prompt. You forget to run your daily code review. Scheduled tasks fix that. Save a prompt once, pick a cadence, and Claude runs it on its own. Wire it up to Channels and the output lands in Telegram or Discord without you lifting a finger.

Two flavors exist. Desktop scheduled tasks are the durable ones. They survive restarts, fire on a visible schedule, and run as long as the app is open. CLI session-scoped tasks use /loop plus cron tools for fast in-session polling, and they die when the session exits. Both get covered here.

Desktop Scheduled Tasks

For recurring work in Claude Code, Desktop scheduled tasks are the main path. Each one runs on your machine and kicks off a fresh session at the time and frequency you picked. Every run gets full access to your files, MCP servers, skills, connectors, and plugins.

Creating a Task

Click Schedule in the Desktop sidebar, then + New task. Fill in these fields:

FieldDescription
NameIdentifier for the task (converted to lowercase kebab-case, used as folder name on disk, must be unique)
DescriptionShort summary shown in the task list
PromptThe instructions sent to Claude each run. Same as any message you'd type in the prompt box
FrequencyHow often the task runs (see cadence options below)

Below the prompt field, more controls show up: model selection, permission mode, working folder, and worktree isolation. Flipping the worktree toggle gives each run its own Git worktree so scheduled work never collides with what you're editing by hand.

Conversational creation also works. Inside any Desktop session, type: "set up a daily code review that runs every morning at 9am." Claude wires it up.

Frequency Options

FrequencyBehavior
ManualNo schedule. Only runs when you click Run now
HourlyEvery hour, with a fixed offset of up to 10 minutes to stagger traffic
DailyTime picker, defaults to 9:00 AM local time
WeekdaysSame as Daily but skips Saturday and Sunday
WeeklyTime picker plus day picker

Anything the picker does not cover (every 15 minutes, first of each month) is handled by asking Claude in plain English inside any Desktop session. Something like: "schedule a task to run all the tests every 6 hours."

How Desktop Tasks Fire

While the app is open, Desktop scans the schedule once a minute. A due task kicks off a fresh session that does not touch whatever you have on screen. To keep API traffic staggered, each task waits a deterministic offset of up to 10 minutes after its scheduled time. The same task always picks the same offset.

Firing triggers a desktop notification. A new session lands under the Scheduled section in the sidebar. Open it to see what Claude did, scan diffs, or answer any pending permission prompts. Inside that session Claude can edit files, run commands, create commits, and open pull requests. It works like any other session.

Missed Runs and Catch-Up

On startup (or when your computer wakes) Desktop walks back seven days looking for runs each task missed. Found any? It fires exactly one catch-up run for the most recent missed time and throws the rest away. Six days of missed daily runs become one run on wake. A notification shows when catch-up starts.

Write your prompts knowing this. A 9am task can end up running at 11pm after your laptop slept all day. If that matters, add guardrails: "Only review today's commits. If it's after 5pm, skip the review and post a summary of what was missed."

Permissions for Scheduled Tasks

Each task carries its own permission mode, set while you create or edit it. Allow rules from ~/.claude/settings.json still apply on top. Run a task in Ask mode, hit a tool the task cannot use, and the run stalls until you approve. The session hangs out in the sidebar so you can answer whenever.

Skip stalls with a trick: click Run now right after creating the task, watch for prompts, and pick "always allow" on each one. Every run after that auto-approves the same tools. Approvals are visible (and revocable) on the task's detail page under the Always allowed panel.

Managing Tasks

Click a task in the Schedule list to open its detail page:

  • Run now: start the task immediately without waiting for the next scheduled time
  • Toggle repeats: pause or resume scheduled runs without deleting the task
  • Edit: change the prompt, frequency, folder, model, or permission mode
  • Review history: see every past run, including skipped ones
  • Review allowed permissions: see and revoke saved tool approvals
  • Delete: remove the task and archive all sessions it created

Management by voice also works. From any session, try: "pause my dependency-audit task", "delete the standup-prep task", or "show me my scheduled tasks."

Task prompts sit on disk at ~/.claude/scheduled-tasks/<task-name>/SKILL.md, with YAML frontmatter for name and description. Edit the file directly and the next run picks up the change.

CLI Scheduled Tasks: /loop and Cron Tools

A lighter scheduling system ships in the CLI. It is session-scoped. Tasks live inside the current Claude Code process and vanish when you exit. Use it for quick polling and in-session monitoring. Not for anything durable.

The /loop Command

Fastest way to schedule a recurring prompt in the CLI:

/loop 5m check if the deployment finished and tell me what happened

Claude parses the interval, turns it into a cron expression, schedules the job, and tells you the cadence and job ID.

Flexible interval syntax:

FormExampleParsed interval
Leading token/loop 30m check the buildEvery 30 minutes
Trailing every clause/loop check the build every 2 hoursEvery 2 hours
No interval/loop check the buildDefaults to every 10 minutes

Supported units: s (seconds, rounded up to nearest minute), m (minutes), h (hours), d (days).

Other commands can be looped too:

/loop 20m /review-pr 1234

Every time the job fires, Claude runs /review-pr 1234 as if you typed it.

One-Time Reminders

Single-shot tasks are even simpler. Plain language does it:

remind me at 3pm to push the release branch

in 45 minutes, check whether the integration tests passed

Claude pins the fire time to a specific cron expression and confirms when it will run.

Under the Hood: CronCreate, CronList, CronDelete

Both /loop and natural language scheduling ride on these tools:

ToolPurpose
CronCreateSchedule a new task with a 5-field cron expression and prompt
CronListList all scheduled tasks with IDs, schedules, and prompts
CronDeleteCancel a task by its 8-character ID

Fifty scheduled tasks max per session. Times run in your local timezone.

CLI Scheduling Constraints

  • Session-scoped: closing the terminal or exiting Claude Code cancels everything
  • No catch-up: if Claude is busy when a task is due, it fires once when idle, not once per missed interval
  • Three-day expiry: recurring tasks auto-delete after 3 days to bound how long a forgotten loop can run
  • No persistence: restarting Claude Code clears all session-scoped tasks
  • Disable entirely with CLAUDE_CODE_DISABLE_CRON=1

Desktop vs CLI: Which to Use

AspectDesktop Scheduled TasksCLI /loop + Cron Tools
PersistenceSurvives restarts, runs as long as app is openDies when you exit the session
SetupVisual form in sidebar/loop 5m prompt inline
Missed runsCatches up from last 7 days (one run)No catch-up
ExpiryNone (runs until you delete it)Auto-deletes after 3 days
Max tasksNo stated limit50 per session
PermissionsPer-task permission mode with "always allow" approvalsInherits session permissions
Git isolationOptional worktree per runNo isolation
Best forDaily reviews, weekly reports, morning briefingsPolling deploys, babysitting PRs, quick checks

Desktop scheduled tasks cover anything you want running tomorrow, next week, or forever. Reach for CLI /loop when the scope is "watch this deploy for the next hour."

Use Cases That Actually Matter

Error Log Monitoring

Thariq from the Claude Code team shared his favorite: "Ask it to check error logs every few hours and create PRs for any actionable errors."

Set it to hourly in Desktop. Plug your logging service in over MCP. The agent reads recent errors, strips noise, and opens pull requests for the ones worth your time. Reviewing PRs replaces scanning logs.

Morning Briefings

Pick 8:30am on weekdays. Connect Slack, email, and calendar via connectors. The agent boils overnight messages down, surfaces anything urgent, and sketches your day. You open Claude Desktop to a briefing that is already waiting instead of burning half an hour on triage.

Weekly Reports

One weekly task pulls data from Google Drive, spreadsheets, and project management tools. Metrics get compiled, trends get flagged, and a formatted report comes out the other side. Especially useful for async teams where status updates are scattered across half a dozen apps.

PR Babysitting (CLI)

Kicked off a PR and want to know when CI finishes? In the CLI:

/loop 5m check the CI status on PR #247 and tell me if it passed or failed

Claude polls every 5 minutes and reports back. CI finishes, you cancel the loop, you move on.

Dependency Audits

Make a weekly task that runs npm audit or pip audit, reads the results, and opens a PR with fixes for any actionable vulnerabilities. Schedule it for Monday morning so the week starts with a clean bill of health.

Recurring Research

Track competitors, industry news, or technology trends on a daily or weekly cadence. Configured sources get browsed, relevant updates get pulled, and summaries come back. Hook web search in for broader coverage.

The OpenClaw Effect

Anyone who caught the OpenClaw wave will recognize the shape of this feature. OpenClaw's pitch was simple: an autonomous AI agent that plugs into your apps and runs tasks for you, on a schedule, without supervision. That pitch pulled in 199K GitHub stars and a run of mainstream coverage, which proved the demand was there for the taking.

Anthropic clearly paid attention. Remote Control shipped in February as a direct answer to OpenClaw's "control your computer from your phone" feature. Scheduled tasks close the next gap: turning an agent loose on a recurring cadence without you in the loop.

Same pattern every time. OpenClaw proves the demand through viral adoption. Anthropic ships the native, integrated, security-first version a few weeks behind. Remote Control replaced OpenClaw's WebSocket-based remote access with an encrypted, outbound-only bridge. Scheduled tasks replace the "always-on personal assistant" concept with a structured, permission-controlled agent scheduler that picks up your full MCP and plugin setup.

Execution is where it matters. OpenClaw hands out broad system access by default and has eaten security incidents along the way (CVE-2026-25253 hit 50K+ instances). Claude Code's scheduled tasks run with explicit permission boundaries and per-task approval controls. OpenClaw wants self-hosting, port forwarding, manual configuration. Claude Code gives you a form and a sidebar.

None of this is a knock on OpenClaw. It proved the category. But for developers already living inside the Claude ecosystem, Anthropic shipping these capabilities natively means you get the same autonomous agent patterns with tighter integration, better security, and zero infrastructure overhead.

Frequently Asked Questions

Do scheduled tasks work in Claude Code CLI? Yes, with a different shape. The CLI has /loop and cron tools for session-scoped scheduling that dies when you exit. Durable scheduling belongs in Desktop scheduled tasks. Always-on cloud scheduling belongs in GitHub Actions with a schedule trigger.

What happens if my computer is asleep when a task is scheduled? The run is skipped. On wake, or when you reopen Claude Desktop, it scans the last seven days for missed runs, kicks off one catch-up for the most recently missed time, and shows a notification. To block idle-sleep, turn on Keep computer awake under Desktop Settings > General. Closing the lid still sleeps the machine.

Can I use scheduled tasks on Linux? Desktop scheduled tasks do not ship on Linux (macOS and Windows only). Linux users have two choices: use the CLI /loop command for session-scoped scheduling, or run cron jobs calling claude -p in headless mode for durable scheduling.

Do scheduled tasks count against my usage limits? Yes. Every run starts a full Claude Code session. Pro plan users with tighter limits should budget for it. Max and Enterprise plans have more headroom.

Can a scheduled task create pull requests? Yes. Each run is a full Claude Code session with access to your local git setup and any configured MCP servers. Wire GitHub in through MCP or connectors and the agent can create branches, commit changes, and open PRs.

Where are task prompts stored? On disk at ~/.claude/scheduled-tasks/<task-name>/SKILL.md. The file uses YAML frontmatter for name and description, with the prompt as the body. Edit it directly and the next run picks up the change.

What This Means for Development Workflows

Scheduled tasks flip Claude from a tool you invoke into an agent that works alongside you on a cadence. Remembering to run the prompt goes away. You declare intent once and the system handles the timing.

Stack it with Remote Control (monitor sessions from your phone) and autonomous agent loops (long-running agentic work) and you get the full picture of Claude as a persistent development companion. Remote Control steers sessions from anywhere. Autonomous loops keep agents working for hours. Scheduled tasks handle the trigger.

For multi-agent setups, a practical pattern falls out: a daily task that reviews overnight agent work, summarizes results, and flags anything that needs a human. The agent is both the worker and the shift supervisor.

Pick one recurring task you still do by hand. A morning inbox triage. A weekly metrics pull. An error log scan. Wire it up as a scheduled task. Run it for a week. Count the time you get back.

More in this guide

  • Agent Fundamentals
    Five ways to build specialized agents in Claude Code, from sub-agents to .claude/agents/ definitions to perspective prompts.
  • Agent Patterns
    Orchestrator, fan-out, validation chain, specialist routing, progressive refinement, and watchdog. Six ways to wire sub-agents in Claude Code.
  • Agent Teams Best Practices
    Battle-tested patterns for Claude Code agent teams. Troubleshooting, limitations, plan mode quirks, and fixes shipped from v2.1.33 through v2.1.45.
  • Agent Teams Controls
    Stop your agent team lead from grabbing implementation work. Configure delegate mode, plan approval, hooks, and CLAUDE.md for teams.
  • Agent Teams Prompt Templates
    Ten tested Agent Teams prompts for Claude Code. Code review, debugging, feature builds, architecture calls, and campaign research. Paste and go.

Stop configuring. Start building.

SaaS builder templates with AI orchestration.

Get Build This Now

Claude Code Channels

Plug Claude Code into messaging apps. Setup walkthroughs for Telegram, Discord, and iMessage plus the workflows that make them worth it.

Claude Code Permissions

Five permission modes, one keystroke to cycle them, and a clean way to match the mode to the task you are on. Here is the full rule syntax and when to use each.

On this page

Desktop Scheduled Tasks
Creating a Task
Frequency Options
How Desktop Tasks Fire
Missed Runs and Catch-Up
Permissions for Scheduled Tasks
Managing Tasks
CLI Scheduled Tasks: /loop and Cron Tools
The /loop Command
One-Time Reminders
Under the Hood: CronCreate, CronList, CronDelete
CLI Scheduling Constraints
Desktop vs CLI: Which to Use
Use Cases That Actually Matter
Error Log Monitoring
Morning Briefings
Weekly Reports
PR Babysitting (CLI)
Dependency Audits
Recurring Research
The OpenClaw Effect
Frequently Asked Questions
What This Means for Development Workflows

Stop configuring. Start building.

SaaS builder templates with AI orchestration.

Get Build This Now