← All guides

Agents · July 11, 2026 · 2 min read

Put your AI on a schedule and let it work while you sleep

The jump from chatbot to AI system is a schedule. Copy my pattern: a job that wakes an agent with a written goal, plus spend caps, least privilege, and logs.

The problem

A chatbot only works while you watch it. Close the laptop and your “automation” stops existing. The work that compounds, filing notes, researching ideas, keeping systems tidy, is recurring work, and recurring work is exactly what you quietly stop doing by week three. The jump from chatbot to system is a schedule.

What runs while I sleep

My machine wakes agents on a fixed timetable using launchd, the Mac’s built-in scheduler. Plain cron gives you the same loop on any system. The current schedule:

  • 04:00, with an 11:00 catch-up: the Librarian files my messy captured notes into a clean linked wiki, part of the second brain that maintains itself.
  • Every 3 hours: a plain script, no LLM, syncs my vaults over git and auto-heals the one conflict class a normal merge cannot resolve.
  • 09:00: my nightly AI co-founder researches and scores every new idea, then writes a PRD for the winners.

Every job appends to its own log file. Their whole output surface is files and git commits: nothing sends messages, nothing spends money.

How do you put an AI on a schedule?

Pair a scheduler with a headless agent run and a written goal. Four steps:

  1. Earn the schedule. Run the job by hand until you trust the output. The cron is not a new thing; it is your trusted run on a timer.
  2. Write the goal as a file in the project (I use CLAUDE.md): what to do, in what order, what done looks like, what to skip. The schedule wakes the agent; the file tells it why it is awake.
  3. Add one line to your crontab:
0 7 * * * cd ~/my-project && claude -p "Run the brief in CLAUDE.md" >> ~/logs/my-job.log 2>&1
  1. Add the rails before the first unattended run. Cap spend at the provider, in the billing dashboard, so the limit holds even if the agent misbehaves. Give the run least privilege: only the tools and permissions the job needs, starting with read-mostly work that drafts instead of sends. And read the log with your morning coffee for the first week.

An agent you have to start by hand is still a chatbot.

Do this now

  1. Pick one recurring job an agent already does well for you manually: a weekly report, note filing, a research pass.
  2. Write the goal file and run it by hand once more, reading the output like a reviewer.
  3. Add the cron line, set the spend cap, and check the log tomorrow morning.

Claude Code

Turn this into a Claude skill

Paste this into Claude Code. It reads this guide and builds a skill shaped to how you work.

Read the guide at https://aiwithamirthan.com/guides/put-your-ai-on-a-schedule. Then build me a Claude Code skill from it, personalized to how I actually work.

1. Fetch and read the full guide at the URL above.
2. Look at my setup so the skill fits me, not a generic template: skim my repos, my CLAUDE.md / AGENTS.md files, my existing skills, and my stack.
3. Create a new skill (a SKILL.md with a clear name, description, and steps) that lets me do what this guide teaches, adapted to my tools and goals.
4. Tell me where you saved it and how to invoke it.

If anything about my setup is unclear, ask me one or two questions first.

Want to build this yourself?

Join Claude Code Academy: courses, build alongs, and builders turning AI into real systems. And I post a new build on Instagram nearly every day.