DEV Community

Ibrahima D.
Ibrahima D.

Posted on

Claude Wake Up ⏰: Start your Claude session at 5 AM (without getting up yourself)

"usage limit reached." Mid-flow, at the worst possible moment. What if that line never landed when you need it most?

The thread running through this article fits in one sentence: your 5-hour window starts at your first prompt, so you decide when your Claude day begins. All that's left is to make that choice while you sleep.

The problem: the 5-hour wall

If you use Claude (and especially Claude Code) heavily, you know the moment: mid-refactor, mid-feature... "usage limit reached." Blocked. Come back in a few hours.

Why? Claude runs on a rolling 5-hour window. And the detail that changes everything: that window doesn't start at midnight, or at any fixed time. It starts the exact moment you send your first prompt.

  • First prompt at 9 AM → reset at 2 PM
  • First prompt at 2 PM → reset at 7 PM

So the root cause of the waste isn't your quota, it's when you open the first window, left to the chance of when you happen to sit down at your desk. And that's where it gets interesting: that moment is yours to choose.

The math: why 5 AM?

Do the count. If your first session starts at 5 AM, here's your day:

Session Window
1 05:00 → 10:00
2 10:00 → 15:00
3 15:00 → 20:00
4 20:00 → 01:00

Four full sessions that line up perfectly with a workday (and an evening of side projects 😏).

Compare that with someone who fires their first prompt at 9:30 when they get to the office: their second window doesn't open until 2:30 PM, the third at 7:30 PM... They only really use two or three. By simply shifting the starting point, you reclaim a whole window per day: no plan change, no extra cost.

The catch, obviously: nobody wants to get up at 5 AM to say hello to an AI.

The "hey Claude" trap (and the trap inside the trap)

Most people's first instinct: open an interactive session and type a quick "hello" or "hey Claude" to kick off the window.

It works, but it's wasteful. An interactive session loads a whole context (system prompt, CLAUDE.md, repo state...), and Claude generates a warm reply nobody will read. Tokens burned for nothing.

Second instinct, smarter on the surface: "what if I just use /usage? That costs nothing!"

That's exactly the trap: /usage probably doesn't start the window. It's a read-only lookup command: it shows your consumption and the next reset time, but it sends no prompt to the model. And the 5-hour window starts at your first request to the model. No tokens spent = no session opened. This is consistent with the fact that everyone automating this strategy uses a real prompt, not /usage.

The actual trick: a real prompt, but minimal

The principle is simple: you need a real request to the model, but the smallest one possible. A one-word prompt, no useless context, ideally on the cheapest model (Haiku). Cost: a handful of tokens, negligible, including against your weekly quota. But the 5-hour window opens.

The next section shows how to send this micro-prompt automatically, machine on or off.

And what about /usage? Keep it for its real job: verifying. Open Claude Code after the automatic wake-up, type /usage, and you'll see your "Current session" bar active with the reset time. That's your proof the wake-up worked.

💡 Want to check for yourself that /usage isn't enough? Wait for your window to expire, run only /usage, then look at claude.ai/settings/usage: no session timer starts.

The automation: Claude wakes up, not you

The whole point of the strategy is that it runs in the background. You sleep. Two methods, from simplest to most hands-on.

Method 1 (recommended): /schedule, Claude Code's native routines

This is the cleanest method, and it makes almost everything else obsolete. Claude Code has built-in routines: automations you configure once, then run on Claude Code's cloud infrastructure. Translation: your machine can be off, the routine runs anyway. No cron, no Raspberry Pi, no VPS.

In a Claude Code session, just type:

/schedule a daily routine at 5:00 AM that just replies "ok" and does nothing else
Enter fullscreen mode Exit fullscreen mode

(You can also create and manage your routines from claude.ai/code.)

Why it's perfect for our case:

  • Available from the Pro plan (as well as Max, Team, and Enterprise), with Claude Code on the web enabled.
  • Routines draw on the subscription's usage limits exactly like an interactive session. That's the key point: the routine taps the same pool as your sessions → it does open your 5-hour window.
  • Real cost: a minimal routine = a few tokens. Negligible.
  • Limit to know: routines have a daily quota (5 per day on Pro, 15 on Max). For one wake-up a day, we're well within it.

⚠️ The winter-time trap: routines are scheduled in UTC cron, not your timezone. If you're in Paris, "5 AM" translates to 0 3 * * * in summer (CEST = UTC+2)... but that same cron will fire at 4 AM the moment daylight saving ends (CET = UTC+1). The shift is silent: nothing breaks, your window just opens an hour too early and your last session ends at midnight instead of 1 AM. Two options: accept the drift, or move the cron to 0 4 * * * in late October (and back in late March). Conversely, local cron (Method 2), launchd, and Task Scheduler follow your machine's local time and therefore don't have this problem: it's specific to UTC-based schedulers (routines, GitHub Actions cron).

💡 Side note: the scheduler adds a few minutes of random jitter. Your "5 AM" routine will land closer to 5:05–5:10. Irrelevant for the strategy.

One command, once, and it's set for every morning.

Method 2 (alternative): cron / launchd / Task Scheduler

If /schedule isn't available in your environment (Claude Code web disabled, company policy...), you can schedule a minimal prompt in headless mode from your own machine.

⚠️ Important warning: Anthropic recently changed how non-interactive usage is billed. Since mid-June 2026, claude -p, Agent SDK, and GitHub Actions calls are reportedly counted against a separate monthly credit from your subscription (no longer the shared session pool). Possible consequence: a claude -p in cron might no longer open the 5-hour window for your interactive sessions. Test at home before relying on it (see the /usage check above). And if it stops working, Method 1 remains the safe bet.

Linux / macOS: cron

crontab -e
Enter fullscreen mode Exit fullscreen mode
# Claude Wake Up: every day at 5:00 AM
0 5 * * * /usr/local/bin/claude --model haiku -p "ok" >> ~/claude-wakeup.log 2>&1
Enter fullscreen mode Exit fullscreen mode

💡 Check your binary's path with which claude. The log lets you confirm at wake-up that everything ran fine.

macOS: launchd (more reliable than cron)

The advantage of launchd: if the Mac was asleep at 5 AM, the job runs when it wakes. Create ~/Library/LaunchAgents/com.claude.wakeup.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>com.claude.wakeup</string>
  <key>ProgramArguments</key>
  <array>
    <string>/usr/local/bin/claude</string>
    <string>--model</string>
    <string>haiku</string>
    <string>-p</string>
    <string>ok</string>
  </array>
  <key>StartCalendarInterval</key>
  <dict>
    <key>Hour</key>
    <integer>5</integer>
    <key>Minute</key>
    <integer>0</integer>
  </dict>
</dict>
</plist>
Enter fullscreen mode Exit fullscreen mode
launchctl load ~/Library/LaunchAgents/com.claude.wakeup.plist
Enter fullscreen mode Exit fullscreen mode

Windows: Task Scheduler

schtasks /create /tn "ClaudeWakeUp" /tr "claude --model haiku -p ok" /sc daily /st 05:00
Enter fullscreen mode Exit fullscreen mode

Machine off overnight?

With Method 1, the question is moot: routines run in the cloud. If you're set on home-grown cron, schedule the machine's wake in BIOS/UEFI (or pmset repeat wakeorpoweron on Mac), or offload the job to an always-on machine: a Raspberry Pi, a small VPS (claude setup-token to generate an OAuth token), or a scheduled GitHub Action (careful: GitHub's cron is UTC).

The limits of the trick (let's be honest)

Two things to keep in mind:

  1. It doesn't create tokens. There's also a weekly cap, shared across all your Claude usage. This strategy reshuffles your 5-hour windows so they fit your day; it doesn't raise your overall quota.
  2. The window slides. If you send nothing between 5 and 10 AM, your "real" activity at 10 simply opens the next window. The payoff is highest on days when you actually work from early morning and risk maxing out several windows in a day.

In short

One /schedule command, zero dawn alarm, and your Claude day begins while you sleep:

  • The 5-hour window starts at your first prompt → choose that moment strategically
  • 5 AM = 4 aligned sessions across your day (5, 10, 15, 20h)
  • Neither an interactive "hello" nor /usage: an automated micro-prompt opens the session for a handful of tokens, and /usage serves to confirm the wake-up worked
  • /schedule (cloud routines, from the Pro plan) = it all happens in the background, even with the machine off (cron/launchd as plan B)
  • Watch out for UTC cron (routines, GitHub Actions): remember to shift your expression at the time change, or your 5 AM wake-up drifts to 4 AM in winter

So the real question isn't "how do I get more quota?". It's:

"What time do I actually want my Claude day to begin?"

Answer that, schedule it once, and let the machine handle it. Claude, wake up. Me, I'm still asleep. 😴


I write about the small automations that take friction out of a developer's day. Let's talk on LinkedIn.

Top comments (0)