This repository gives you two ways to run a tiny Claude Code request on a schedule:
- GitHub Actions: GitHub runs the warmup for you.
- Ubuntu cron: your own Ubuntu server runs the warmup from a local
.envfile.
Both paths do the same essential thing: send one small Claude Code prompt with Haiku and no session persistence.
claude -p "Reply with exactly: ok" --model haiku --no-session-persistenceThe goal is to touch Claude Code before you begin working, so the usage window starts at a time you choose instead of at the moment you first sit down.
.github/workflows/claude-warmup.yml
.env.example
docs/ubuntu-cron.md
scripts/claude-warmup.sh
Use the GitHub workflow if you want GitHub-hosted scheduling. Use the Ubuntu cron workflow if you want the warmup to run from a server you control.
The GitHub workflow is configured here:
.github/workflows/claude-warmup.yml
It runs Monday through Friday at 7:00 AM Korea Standard Time:
- cron: "0 22 * * 0-4"GitHub schedules are UTC, so 22:00 UTC Sunday through Thursday maps to 7:00 AM KST Monday through Friday.
Create a Claude OAuth token on a machine where Claude Code is installed:
claude setup-tokenCopy the token. It usually begins with:
sk-ant-oat01-
Add it as a GitHub Actions repository secret:
gh secret set CLAUDE_OAUTH_TOKENOr add it in GitHub under:
Settings > Secrets and variables > Actions > New repository secret
Use this exact secret name:
CLAUDE_OAUTH_TOKEN
Push the workflow to GitHub, then trigger it manually:
gh workflow run claude-warmup.ymlCheck the logs:
gh run list --workflow claude-warmup.yml
gh run view --logA successful run should say:
Claude warmup finished successfully.
If Claude reports a usage limit, the workflow treats that as a completed warmup because the request reached Claude.
The Ubuntu cron setup uses:
scripts/claude-warmup.sh
.env.example
This path is useful when you want the warmup to run from a server instead of GitHub Actions. The server stores the Claude token in a local .env file.
Read the full Ubuntu guide here:
docs/ubuntu-cron.md
The short version:
cp .env.example .env
nano .env
chmod 600 .env
chmod +x scripts/claude-warmup.sh
./scripts/claude-warmup.shThen add a cron entry:
TZ=Asia/Seoul
0 7 * * 1-5 /home/YOUR_USER/tools/warmup/scripts/claude-warmup.sh >> /home/YOUR_USER/tools/warmup/logs/cron.log 2>&1Replace YOUR_USER with your Ubuntu username.
For Ubuntu cron, copy .env.example to .env and fill in the token:
CLAUDE_OAUTH_TOKEN=sk-ant-oat01-your-real-token-here
CLAUDE_WARMUP_PROMPT="Reply with exactly: ok"
CLAUDE_WARMUP_MODEL=haikuThe real .env file is ignored by Git.
After either scheduled path runs, open Claude Code and check:
/usage
Compare the displayed reset time with the scheduled warmup time. If it does not line up the way you expect, adjust the schedule and test again.
Treat the Claude OAuth token like a password.
For GitHub Actions, store it only as a repository secret. For Ubuntu cron, store it only in .env and keep that file private:
chmod 600 .envDo not commit .env, paste the token into logs, or share the token in chat.