How a 6 AM Cron Job Unlocks 2 Extra Hours of Claude Code Every Day

Schedule a single Haiku message to shift your 5-hour usage window, eliminating midday dead time without changing your workflow.

GAla Smith & AI Research Desk·9h ago·3 min read·4 views·AI-Generated
Share:
Source: reddit.comvia reddit_claudeCorroborated

The Technique — Anchoring Your Usage Window

If you're on a Claude Max plan, you know the 5-hour usage window starts with your first message and resets on the clock hour. Start at 8:30 AM, hit your limit by 11 AM, and you're locked out until 1 PM—two hours of dead time. Developer Victor Smoliveira discovered a simple workaround: send a throwaway message with Claude Haiku (the cheapest model) at 6 AM. This anchors your window to 6-11 AM instead of 8 AM-1 PM. By 11 AM, you get a fresh window exactly when you'd normally be blocked.

Why It Works — Understanding Claude Code's Billing Cycle

Claude Code's usage window operates on a rolling 5-hour basis, but it's "floored" to the nearest clock hour. The system tracks when you first use any Claude model (including Haiku) and calculates your reset time as that hour plus five hours. By sending a minimal-cost Haiku message early, you control when the window starts without consuming significant tokens from your allocation. This works on Pro, Max 5x, and Max 20x plans because the window logic is consistent across tiers.

How To Apply It — Two Methods

Method 1: GitHub Actions Cron (Victor's Original Solution)

Fork Victor's repository at https://github.com/vdsmon/claude-warmup:

  1. Add your Claude OAuth token as a repository secret named CLAUDE_OAUTH_TOKEN
  2. Configure the schedule in .github/workflows/warmup.yml:
on:
  schedule:
    - cron: '0 6 * * *'  # Runs at 6 AM UTC daily
  1. Customize the message if desired (default is just "hi")

The workflow uses the official Claude API to send a single Haiku message, costing virtually nothing while triggering your window start.

Method 2: Claude Code Web Scheduled Tasks (Simpler Alternative)

As noted in the Reddit discussion, Claude Code Web now offers built-in scheduling at https://claude.ai/code/scheduled. While untested by Victor, this native approach should work similarly:

  1. Navigate to the scheduled tasks page
  2. Create a new task set to run at your desired morning time
  3. Configure it to send a minimal message via Claude Code
  4. No OAuth token management required

Important Considerations

  • Time zones matter: Ensure your cron job or scheduled task runs at the correct local time for your work schedule
  • Token cost is negligible: A single Haiku "hi" costs fractions of a cent
  • No workflow changes: Your actual Claude Code usage pattern remains unchanged—you just gain earlier reset availability
  • Works with any model: The window anchors on first usage, regardless of which Claude model you use

This follows Anthropic's recent promotion of new features and best practices for Claude Code, including the usage dashboard that makes tracking these windows easier. The technique leverages the existing billing infrastructure rather than requiring any policy changes from Anthropic.

AI Analysis

**Immediate action**: Set up either the GitHub Actions cron or Claude Code Web scheduled task tonight. Choose 6 AM or whatever time gives you a fresh window right when you typically hit your limit. If you usually exhaust tokens around 11 AM, a 6 AM anchor gives you a reset at 11 AM. If your pattern varies, adjust accordingly. **Workflow adjustment**: Monitor your usage dashboard for a few days to identify when you typically hit limits. The dashboard (recently promoted by Anthropic) shows exactly when your window started and when it resets. Use this data to optimize your anchor time. **Token economics**: This works because Haiku messages cost significantly less than Sonnet or Opus. Even sending this daily for a month costs less than a single substantial coding session. The technique is essentially free window management. This connects to our recent coverage of Claude Code's source leak—developers are finding creative ways to optimize the tool's constraints. While not a feature Anthropic built intentionally, it's a legitimate use of the existing billing system that can save hours of productivity loss.
Enjoyed this article?
Share:

Related Articles

More in Products & Launches

View all