Skip to main content

Cron wakes Grok Bot only for changes, and a queued Muse job returns in 40 minutes

XXarangamani2026-11-14

Code and reposLimitsAuthor's claim, unverifiedRead first

Overview

A small Grok Bot team used expensive allowance to check the same server every few minutes and spend a long time on low-priority research and cleanup that required little judgment.

Workflow

  1. Trigger: The bot was doing work that cheap code could handle. The author calls a bot checking the same server every few minutes an expensive cron job, with a similar problem for long, non-urgent research, price comparisons and cleanup. The author wants bots to handle work that needs judgment.
  2. Set up a small network. A Tailscale tailnet includes a FreeBSD home server called media, a VM called proton, the author's Mac, Grok Bot and an additional AI agent, Muse.
  3. Script: Let cron watch and a webhook wake the bot. Run a small shell check on media and proton under cron. If nothing changed, nothing happens. On a change, POST to the webhook and Grok Bot wakes to look. The bot joins only when there is a reason.
  4. Bot: Queue slow work. Any bot requesting slow work asks Server Maintenance Bot to write a task file to the queue on proton with the requester's name. Server Maintenance itself requested the first test.
  5. Second AI: Have Muse do the work and write back. On an outbound-only VM in the same tailnet, Muse uses a restricted muse user to pull the queue over SSH every 15 minutes, spends its own allowance on the work and writes results to an outbox. Muse gets no logins or personal data and does not operate the author's accounts.
  6. Script: Wake the named bot only when the result exists. The watcher on proton runs every 5 minutes and POSTs a webhook only for the bot named in the task file, once the result is present.
  7. Bot: Save it as a shared Skill. The Chief of Staff converts the successful workflow into a shared Skill for any team bot to use. Use it only for low-risk, non-urgent, token-heavy tasks. Exclude secrets, logins and personal data, keep Muse away from accounts, and expect to wait.
  8. Check: The author checked the first test's timeline: queue time, result time and webhook time. The source gives no before-and-after allowance figures.

Key points and results

  • The first test took 40 minutes, mostly waiting. In Pacific time, the job was queued at 14:10, Muse wrote the result at 14:45 and the webhook fired at 14:50. That is 35 minutes for a result and 40 minutes for the bot to wake. A task can wait up to 15 minutes for Muse to see it, then another few minutes for Grok Bot to wake. The author designed for non-urgent work. For tasks needed in minutes, the bot or author should do the work directly.
  • Savings come from two places. Shell checks use no bot allowance, and slow work uses Muse's allowance. Muse is on the free tier at the time of writing, so that part is almost free. The calculation changes if that changes.
  • The author also upgraded plans. The author credits the setup with a large part of why the allowance runs out less often but also notes the upgrade. The source gives no comparison figures. Bot in Practice did not reproduce it.
  • Keeping secrets out of the queue depends on the bots. Nothing scans a task file before Muse reads it. The network enforces outbound-only access and the user can touch only the queue. The bot writing the task still determines what goes in it.
  • Only the successful path was tested. One job went as expected. The setup has no handling for a Muse crash, a malformed task file, a failed webhook or a backed-up queue, and has no retries, timeouts or dead-letter handling. The author suggests adding a timeout first. If no result arrives within the window, wake the requester anyway, retry once or give up and report it.
  • Polling is simplest and slowest. The author acknowledges that push-based wakeups would be faster.
  • The first half works without a second agent. Start with a small script that checks what matters and a webhook that wakes the bot only when it finds a change.

Source

Platform
X
Author
arangamani
Published
Categories
Code and repos, Limits

What this evidence label means

Author's claim, unverified

The method and results come from the author's own account. This site has not reproduced them.

Read the editorial and evidence policy

Other cases in this scenario

This unofficial community project is independent of xAI. xAI has neither approved nor endorsed it. No sign-up. The methods and figures come from the original authors.