How to schedule Kimi Code: in-session cron, kimi -p and CodeAgentSwarm
By CodeAgentSwarm · Updated October 31, 2026
kimi -p or CodeAgentSwarm Scheduled Conversations.Can Kimi Code run on a schedule?
- Inside a session: yes, the agent can set recurring prompts while that session lives.
- With nothing open: use cron with
kimi -p, or CodeAgentSwarm.
Kimi Code's in-session cron
Kimi Code has CronCreate, CronList and CronDelete tools that re-send a prompt into the same session. Those tasks are bound to that session and stay active when you resume it with kimi --session. A session holds up to 50, recurring ones expire after 7 days, and KIMI_DISABLE_CRON=1 turns them off. Kimi Code tools reference
That is useful for "check the build every 10 minutes while I work". For a job that must start at 07:30 every weekday, you need something outside the session.
A Kimi Code cron job with kimi -p
# crontab -e: weekdays at 07:30
30 7 * * 1-5 cd ~/code/my-app && kimi -p "Sort the new issues into bug, feature and question. Do not edit files." >> ~/logs/kimi-cron.log 2>&1--output-format stream-json gives machine-readable output. Kimi says to use --yolo only in trusted, version-controlled workspaces. Kimi Code cheat sheet
Schedule Kimi Code in CodeAgentSwarm
- Open Scheduled in the top bar and press New schedule. Or type the prompt in a Kimi Code Chat and pick Schedule this prompt… from the send menu.
- Pick the Project and choose Kimi Code as the agent. Model, reasoning and permissions are optional: leave them on Default or set them like in the Chat composer.
- Write the prompt the agent should run every time.
- Under When, choose At set times (up to 24 a day), Every few hours (1, 2, 3, 4, 6, 8 or 12) or When I run it, and the days.
- Choose Visible (opens a Chat) or Headless (no tab, result in Scheduled), and whether each run continues the same conversation or starts a new one. Press Create schedule.

Prompts worth scheduling with Kimi Code
- Every weekday at 07:30: read the new issues and label each one as bug, feature or question in a short list.
- Every 6 hours: run the test suite and explain any new failure.
- Fridays at 18:00: write a short summary of what changed in the repo this week.
Every scheduled run uses your Kimi Code plan like any other session. Spread heavy jobs over the day with Every few hours instead of stacking them at the same minute.
What happens on each run
- With Continue the same conversation, a visible run goes to the Kimi Code agent that already holds the conversation, and never opens a second copy. With Start a new conversation, each run opens a fresh agent. If it is busy, Skip if still working (on by default) skips that slot; turn it off and the prompt waits in the queue.
- The Chat marks every scheduled run, so you can tell your own messages from the scheduled ones and reply to a run like any other message.
- If CodeAgentSwarm was closed or the computer asleep at the set time, If missed, run when the app opens runs it once, late. A week away gives one run, not seven.
- Schedules run on your computer, so CodeAgentSwarm has to be open. Your phone can list, edit and run them from the Scheduled tab.
FAQ
Does Kimi Code have cron?
Inside a session: the agent can schedule prompts that repeat in that session, and recurring ones expire after 7 days. For a schedule with nothing open, use cron or CodeAgentSwarm.
How do I run Kimi Code from cron?
Add a crontab line that changes to the project and runs kimi -p with your prompt, writing the output to a log.
Do scheduled runs count against my Kimi Code quota?
Yes. Every run uses your Kimi Code plan like a normal session, so spread heavy jobs across the day.