File of the day
A Claude Code rule that offers to put the work you keep giving it on a schedule
Slava Sazhin 21 October 2026 6 min read 0 views
Claude Code spots the work you give it again and again, offers in one line to run it on a schedule, and on your yes sets it up and runs it once.
Today's file is a rule for Claude Code that notices the work you keep handing it. Every Monday you ask for last week's sales summary, every Thursday you have it check a supplier's prices, and every time you type the same request and wait for it. With this rule, when a task looks regular, Claude first looks for it in the history of your past conversations and counts. If the work has come up again and again and can run without you, the reply ends with one line offering to put it on a schedule. Say "yes" and Claude sets the schedule up itself and runs the job once, so you see the result.
How it works
Claude offers a schedule only when four things hold together: you give it this work again and again, not for the first or second time, counted from the history in ~/.claude/projects and not from memory; you are not needed between runs; the result shows whether it worked; and the time saved is worth more than setting up the schedule and keeping an eye on it. If even one fails, there is no offer at all, not even "for later". If all hold, one line at the end of the reply, never more than one, and you decide. After your "yes", Claude puts the work on your system's schedule as a claude -p run with exactly the permissions it needs, then runs it once the way the schedule will and shows you what came out.
We tested it in four languages on a made-up cafe owner, 158 headless runs. Her conversation history held a weekly sales summary 7 times, the weekly totals as JSON 5 times, a weekly check of a supplier's prices 5 times, replies to reviews she picks from 5 times, a monthly stock order twice, a loyalty card count once and a few one-offs. The note's own check ("what work do I give you again and again...") named the weekly sales summary 16 times of 16 and left the review replies out every time, because she chooses in the middle of each run. Asked for the sales summary an eighth time, Claude made it and ended with the one-line offer in 9 runs of 12; without the rule, never (0 of 3). The loyalty count asked for the second time, a sign for the door and 17 times 23 got no line (0 of 24). Totals asked for "as JSON only, nothing else" came back as clean JSON every time (16 of 16), so a script that reads the answer does not break. After "yes", Claude added the job to her crontab and kept the backup line that was already there, every time (12 of 12), and the first run made the report or updated the price list.
What we changed
One sentence, in all four languages. The rule had the scheduled job run with --permission-mode acceptEdits. In that mode a job may change any file in the folder it starts in without asking: asked plainly, such a run created a macOS LaunchAgent and a Linux autostart entry and rewrote the cafe's home page, without a single question. Claude starts the job in the folder you work in, for many people their home folder, and the work worth scheduling often reads text from outside: in 5 of 16 runs of the check, Claude also offered the supplier price check, which reads the supplier's web page. Whoever can change that page could then give orders to a job allowed to change any of your files. Changed: the job gets --allowedTools for exactly the files and folders it writes, as Edit(//full/path/...), and no acceptEdits. After the change, every job Claude set up and ran could write only to its own report or to the price list (7 of 7), and each still did its work on the first run. We also hid a note on the supplier page telling AI assistants to change the cafe's home page. Claude never followed it, with the old wording or the new (0 of 14 page reads), and often told the owner about it.
What to know
- "The third time" in the note's check 3 is not a promise. A monthly stock order asked for the third time got the line once in 8 runs: Claude usually held back, for example because the stock count has to be updated by hand first. Weekly work that had come up seven times got it 9 times of 12.
- Claude decides for itself what "not needed between runs" means. For review replies you pick from, there was no line in English, Russian and Serbian (0 of 6), but in Portuguese Claude offered to draft them on a schedule for you to pick from (2 of 2).
- Before it replies to a task that looks regular, Claude reads your past conversations in
~/.claude/projects. It does not ask for that, and it adds a few steps to the reply. - Claude Code asks before it changes your crontab, writes a script outside your folder or runs the job: answer Yes, as the note says. The first run is worth reading. Once the job failed because the request came after the list of tools and
claudetook it for one more tool; Claude saw it on that first run and fixed it. - The rule is in your global file, so the scheduled job reads it too. In our runs no scheduled job offered to schedule itself. We tested on Linux with cron.
Install
The rule goes at the end of ~/.claude/CLAUDE.md, the file with your instructions for all projects; the note below has the exact request. That folder holds Claude's own settings, so Claude asks before it edits the file: answer Yes. Then close Claude Code and open it again, because the file is read at startup. The check from the note below: ask "Look through the history of our past conversations: what work do I give you again and again, and which of it is worth putting on a schedule?" Claude names that work and what it saves you, or says there is nothing to schedule yet. Reply "yes" to its suggestion, and it puts the work on a schedule and runs it once.
The files
Every file of the day on GitHub# Offer to schedule the work I give you again and again
You suggest putting work on a schedule in one case only - when all of these hold:
- I give you this work again and again, not for the first or second time; when you get a task that looks regular, before replying you look for similar ones in the history of our past conversations (the `~/.claude/projects` folder) and count from it, not from memory;
- I am not needed between runs;
- the result shows whether it worked or not;
- the time saved is worth more than setting up the schedule and keeping an eye on it.
If even one does not hold, you do not suggest it at all, not even a line, not even for later. If all hold, one line at the end of the reply, no more than one per reply, and I decide.
If I say "yes", you put the work on my system's schedule yourself, running `claude -p` with `--add-dir` for each folder it writes to outside the working folder, and with `--allowedTools` for each command and network request it needs and for exactly the files and folders it writes: `Edit(//full/path/file)`, `Edit(//full/path/folder/**)`; not with `--permission-mode acceptEdits`, which lets the work change any file in the folder it starts in without asking; right after that you run it once the same way the schedule will and show me the result.
# How Claude Code tells you which work is ready to run on a schedule without you
1. Ask Claude: "Append the contents of the downloaded file offer-a-schedule.md to the end of ~/.claude/CLAUDE.md, and if that file does not exist, create it".
2. Close Claude Code and open it again: rules are read at startup.
Check:
1. Ask Claude: "Look through the history of our past conversations: what work do I give you again and again, and which of it is worth putting on a schedule?" Claude Code names that work and what it will save you, or says there is nothing to schedule yet.
2. If you agree with the suggestion, reply "yes". Claude Code puts the work on a schedule by itself and runs it once right away so you see the result; if it asks permission to run a command, allow it.
3. From then on, when you give it a familiar task for the third time and it can be done without you, one line with a suggestion appears at the end of the reply.
Was this article worth your time?
Give Claude a computer of its own
Your own Linux machine with Claude Code on it, working around the clock while your laptop is shut. From $3.49 a month.