Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Cron Jobs

Schedule tasks to run on a recurring schedule. Cron jobs can run in isolated sessions or wake the main session.

CLI Management

# Add a job
opencrabs cron add \
  --name "Morning Report" \
  --cron "0 9 * * *" \
  --tz "Europe/London" \
  --prompt "Check emails, calendar, and give me a morning briefing" \
  --deliver-to telegram:123456

# List all jobs
opencrabs cron list

# Enable/disable (accepts name or ID)
opencrabs cron enable "Morning Report"
opencrabs cron disable "Morning Report"

# Remove (accepts name or ID)
opencrabs cron remove "Morning Report"

Agent Management

The agent can also manage cron jobs via the cron_manage tool:

"Create a cron job that checks my emails every morning at 9am"

Options

FlagDescription
--nameJob name (unique identifier)
--cronCron expression (e.g. 0 9 * * *)
--tzTimezone (e.g. America/New_York)
--promptThe prompt to send to the agent
--providerAI provider to use (optional)
--modelModel to use (optional)
--thinkingThinking mode: on, off, budget_XXk
--deliver-toChannel delivery: telegram:CHAT_ID, discord:CHANNEL_ID, etc.
--auto-approveAuto-approve tool use for this job

Heartbeat vs Cron

Use heartbeat (HEARTBEAT.md) when:

  • Checks are periodic but timing is flexible (~30 min)
  • You want to reduce API calls by batching
  • Tasks share the main session context

Use cron when:

  • Exact timing matters (“9:00 AM every Monday”)
  • Task needs isolation from main session
  • You want a different model or thinking level
  • Output should deliver to a specific channel