Claude Code Scheduled Tasks: 7 Essential Ways to Automate Your Cron Jobs in 2026

🌐 この記事を日本語で読む

Wake Up to Done.
cron jobs that run AI while you sleep.

For official documentation, see the Anthropic Claude Code docs. MCP specifications are available at modelcontextprotocol.io.

Claude Code is not just an interactive tool — it can also run Claude Code scheduled tasks like a cron job. Daily digests, monthly invoices, price monitoring — the AI handles these automatically while you sleep.

This article covers how to configure Claude Code scheduled tasks and showcases the recurring jobs I run in production.

目次

How Claude Code Scheduled Tasks Work

Claude Code has a built-in Scheduled Tasks feature. You specify a cron expression, and Claude Code automatically launches at the designated time to execute the task. Task definitions use the same SKILL.md format as custom skills, keeping the learning curve minimal.

.claude/scheduled-tasks/
├── monthly-invoice/SKILL.md   # Monthly invoice
├── claude-update-digest/SKILL.md  # Update digest
├── the-stash-daily/SKILL.md       # Finance data sync
└── yeezy-claim-followup/SKILL.md  # Inquiry follow-up

📊 Schedule Patterns in Production

graph LR subgraph Daily D1[Digest] D2[Finance Sync] end subgraph Monthly M1[Invoice] end subgraph On-demand P1[Email Check] P2[Reminder] end P1 -.-> P2 M1 ==> G[Gmail] D2 ==> DB[DB Update] style M1 fill:#e74c3c,stroke:#fff,color:#fff style P2 fill:#e67e22,stroke:#fff,color:#fff
📄
Monthly Invoice
Auto-triggers at month-end, Excel→PDF→send all automatic
☀️
Daily Digest
Morning 9am email delivery of key updates
🔍
Polling Monitor
Every 30min email check with instant notification

Setting Up Schedules

There are two ways to configure Claude Code scheduled tasks. First, you can use natural language in the terminal:

/schedule create "Send a digest every morning at 9"

Claude Code interprets this and sets the appropriate cron schedule. Alternatively, you can specify cron expressions directly:

0 9 * * *    # Daily at 9:00 AM
0 10 1 * *   # 1st of each month at 10:00 AM
*/30 * * * * # Every 30 minutes

Furthermore, you can choose between one-shot (single execution) and recurring modes depending on the use case.

Production Claude Code Scheduled Tasks

Monthly Invoice Automation

At month-end, this job automatically launches and performs the entire invoice workflow:

  1. Calculate monthly working hours
  2. Fill in the Excel invoice template
  3. Convert to PDF
  4. Upload to the B2B platform
  5. Send notification email via Gmail

What previously took 30 minutes of manual work each month is now fully automated. Consequently, this is the highest-impact job among my Claude Code scheduled tasks.

Claude Code Update Digest

This job collects the latest Claude Code release notes and updates, summarizes them, and sends the digest by email. As a result, I never miss new features or important bug fixes.

Daily Finance Data Sync

Fetches daily transactions from the freee API and updates the THE STASH finance dashboard database. Because it runs every day, the dashboard always shows up-to-date financial data.

Inquiry Follow-Up Monitoring

Periodically checks Gmail for replies to customer service inquiries. When a reply arrives, it sends an immediate notification. This significantly reduces the risk of missing important responses.

⏰ Cron Expression Quick Reference

0 9 * * *
Daily 9:00 AM
0 9 * * 1
Mon 9:00 AM
0 10 1 * *
1st of month 10:00
*/30 * * * *
Every 30 min
0 9,18 * * *
Daily 9AM & 6PM
0 0 L * *
Last day of month

Format: min hour day month weekday — * = every, */N = every Nth

Combining Recurring and One-Shot Jobs

A powerful technique is to pair recurring polls with deadline reminder one-shots. For example, if you create a recurring job that checks for email replies every 30 minutes, also create a one-shot job that sends a reminder the night before the deadline. This combination ensures nothing falls through the cracks.

Best Practices for Claude Code Scheduled Tasks

  • Write clear SKILL.md procedures — Unattended execution means ambiguous instructions cause unexpected failures
  • Configure error notifications — Not knowing a job failed is the worst outcome
  • Remove completed jobs — Leftover polling for resolved issues wastes tokens and compute
  • Review execution logs regularly — Check the dashboard periodically to catch anomalies early
  • Always pair with deadline reminders — Every recurring poll should have a corresponding one-shot notification

Next Up

The next article covers App Development. I will walk through building the THE STASH finance dashboard with Claude Code, from design to deployment — a real-world case study of AI pair programming.

よかったらシェアしてね!
  • URLをコピーしました!
  • URLをコピーしました!
目次