Skip to content

Recurring tasks

Tell Han AI to do something on a schedule and it persists the job, runs it via node-cron, and reports back when the schedule fires.

What it does

Captures a recurring instruction, stores it durably on the VPS, and executes it on its cron expression.

FieldValue
Schema namesschedule_recurring, list_recurring, cancel_recurring
Powered bynode-cron plus SQLite
State path/var/hanai/state/owner_cron.db
Survives rebootYes

When Han AI uses it

  • You ask for a weekly digest of something.
  • A monthly review needs to happen automatically.
  • A daily nudge or status check is part of how you operate.

Examples

  • “Every Friday at 5pm, summarise this week’s conversations and email it to me.”
  • “On the 1st of each month, generate the PnL PDF and send it.”
  • “Every weekday at 9am, check the supplier portal and flag anything new.”

The bot then echoes the schedule back to you in plain English. list_recurring shows what is queued; cancel_recurring removes one.

Limits

  • Cron resolution is one minute, not sub-minute.
  • A job that depends on a tool that is no longer available (e.g. credentials removed) will log a capability gap rather than silently fail.
  • Long-running tasks (over 15 seconds) inside a single tick should be modeled as scheduled jobs that themselves dispatch follow-ups.

Why this stack

node-cron is in-process, dependency-free, and the SQLite file gives durable persistence without standing up another service.

See also