What if your code review was already done when you woke up, your newsletter sources were organized, and a security vulnerability report was waiting for you? Claude Code's Scheduled Task isn't just a dream. Set it up once and it runs automatically on repeat — real automation.

TL;DR
Type /loop or /schedule Set repeat interval (5min to weekly) Write one prompt Claude auto-executes on schedule Just check the results

What Is It?

It's a scheduled task feature added to Claude Code. Write a prompt once, set the execution interval, and Claude runs it automatically on repeat. No more opening the terminal and typing commands every time — set it up and Claude handles the rest.

There are two paths. In Claude Code (terminal), you use the /loop command to set up recurring tasks within a session. In Claude Cowork (desktop app), you use the /schedule command to create persistent schedules that survive even after closing the app.

Using /loop in the terminal is dead simple.

/loop usage examples

/loop 5m check deploy status and report back — runs every 5 minutes
/loop 2h review PR 1234 — runs every 2 hours
/loop check the build — defaults to 10 minutes when no interval specified
remind me in 45 minutes to check if integration tests passed — natural language one-off reminders work too

Under the hood, it generates cron expressions and registers them with the scheduler. Three tools power this behind the scenes: CronCreate, CronList, and CronDelete. You can register up to 50 per session. Times are based on your local timezone, so "every day at 9 AM" means 9 AM in your time zone.

50
Max tasks per session
3 days
Auto-expiry for recurring tasks
1 min
Minimum interval (cron unit)

The Cowork desktop app takes it further. Go to the "Scheduled" menu in the sidebar and you can set task name, description, prompt, and frequency (hourly, daily, weekly, weekdays only) through a GUI. After the first run, Claude optimizes the prompt for more accurate results on subsequent executions.

What's Different?

Until now, AI tools have been strictly reactive. You had to ask for an answer, trigger an execution. Scheduled Task flips this to proactive. Claude works while you sleep, while you're in meetings, while you're off the clock.

Traditional (manual) Scheduled Task (auto-repeat)
Code review Manually check every morning Auto-runs at 9 AM daily, just review results
Security audits "I'll do it later" → forgotten Auto vulnerability scan every Monday at 10 AM
Dependency management Updates pile up, then explode all at once Auto-check every Thursday, recommends safe updates
Deploy monitoring Manually refresh every 5 minutes /loop 5m for auto-polling, alerts when done
Starting the day Spend 30 minutes figuring out what to do Morning briefing already waiting

@joshproductletter (Josh) called this feature "Claude Code 2.0" on Threads. Automatic card news uploads, self-improving prompts, SaaS doc auto-updates, template generation automation, newsletter auto-curation — every recurring task can be delegated.

Real-world use cases make it click. Daria Cupareanu tested 6 scheduled tasks — morning email/calendar briefing, automatic file cleanup, Stripe revenue reports, invoice organization, Apple Notes tidying, and flight price tracking. One marketer runs a competitive analysis agent automatically every Monday using Railway + cron.

The community also built an open-source plugin called claude-code-scheduler. It uses OS-native schedulers (macOS launchd, Linux crontab, Windows Task Scheduler) so tasks run even when Claude Code is closed. It also supports Git Worktree mode — work in an isolated branch, then auto-open a PR.

/loop (Claude Code terminal) Cowork Scheduled Task claude-code-scheduler (plugin)
Persistence Gone when session ends Persists after app closes Permanently via OS scheduler
Configuration Natural language / cron GUI + /schedule Natural language / JSON config
Auto-expiry Auto-deletes after 3 days Manual management Manual management
File modifications Follows session permissions Follows Cowork permissions Supports autonomous mode
Best for Short-term monitoring during dev sessions Recurring task automation, including non-devs DevOps, unattended automation pipelines

Limitations to know

/loop (terminal): Only runs while the session is open, and auto-expires after 3 days. If Claude is mid-response, the task queues and runs once after completion (no catch-up for missed runs).
Cowork: Persists after closing, but long-running tasks and third-party integrations may have constraints.
Plugin: Uses the --dangerously-skip-permissions flag, so only use autonomous mode for trusted tasks.

Quick Start Guide

  1. Start right from the Claude Code terminal
    Fastest way to get going. Type /loop 30m check PRs in the terminal and you're done. Runs automatically every 30 minutes. Specify intervals with s (seconds), m (minutes), h (hours), d (days), or natural language like every 2 hours.
  2. On Cowork desktop, use /schedule
    Update Claude Desktop to the latest version (you might need to update twice). Type /schedule in a Cowork session and Claude will walk you through setup with questions. Or go to "Scheduled" → "New task" in the sidebar to create one directly.
  3. Specific prompts are everything
    "Review the code" is vague. "Check commits from the last 24 hours for bugs, security issues, and missing error handling, then list them by file:line number" produces much better results. After the first run, Claude auto-optimizes the prompt, so it's fine to start with a rough idea.
  4. Management and monitoring
    In the terminal, just ask "what scheduled tasks do I have?" to see the list. "Cancel the deploy check task" to delete. In Cowork, the Scheduled section in the sidebar lets you view run history, edit, pause, or delete tasks via GUI.
  5. Advanced: For persistent scheduling
    If you need tasks that run even when the terminal is closed, install the claude-code-scheduler plugin. Run /plugin marketplace add jshchnz/claude-code-scheduler to install, and it registers with your OS-native scheduler. Turn on Git Worktree mode to work in an isolated branch without touching main, then auto-open a PR.