harahara
AutomationScheduled Tasks

Scheduled Tasks

Run hara on a schedule with hara cron — cron expressions, intervals, and one-shots, fired by your OS scheduler.

hara cron schedules tasks that run unattended. There's no daemon — a per-minute tick is registered with your OS scheduler (launchd on macOS, crontab on Linux), and hara runs whatever is due.

Schedule a task

hara cron add "0 9 * * 1" "summarize last week's commits" --name weekly-digest
hara cron add "every 30m" "run the test suite and report failures"
hara cron add "in 2h"     "draft release notes for the next version"

A schedule can be a cron expression, a relative interval (every 30m, in 2h), or an ISO timestamp. Add --org to route the task through role dispatch instead of a plain headless run.

Or just ask in chat — "every morning at 9, check Hacker News and send me a summary" — the agent manages jobs itself through the cronjob tool (approval-gated; and sessions spawned by a cron job can't schedule more jobs, so scheduling can't snowball).

The deterministic lane, timezones, and delivery

hara cron add "13 3 * * 1" "python3 scripts/export.py" --command --tz Asia/Shanghai \
  --deliver feishu:oc_xxxx --name weekly-export
  • --command runs the task as a plain shell command — no agent, no tokens, exact exit codes. Prefer it for fixed scripts; save the model for jobs that need judgment.
  • --tz <IANA> pins a cron expression to a wall clock (validated at add time).
  • --deliver telegram:<chatId> | feishu:<chatId> | webhook:<url> pushes each run's outcome (+ output tail) to a channel — one-shot, no gateway process needed (uses the same env vars). After 3 consecutive failures a single 🚨 alert fires on the same channel (6h cooldown; tune with the job's alertAfter).

Install the tick

hara cron install      # register the per-minute tick with launchd / crontab
hara cron uninstall    # remove it

Manage jobs

CommandDoes
hara cron listlist jobs (alias ls)
hara cron remove <id>delete a job (alias rm)
hara cron enable <id> · disable <id>keep a job but stop / resume firing
hara cron run <id>run a job now, ignoring its schedule
hara cron logs <id>show a job's recent run output
hara cron tickrun everything due now (this is what the OS scheduler calls)

Jobs live in ~/.hara/cron/jobs.json. Headless runs use a resumable session, so a recurring job can build on its own prior output.

Was this helpful?
harahara
A product by Nanhara · Apache-2.0 · v0.139.0

© 2026 Nanhara Technologies