Skip to content

feat(cron): tole cron CLI, cron tick, serve ticker, agent and script modes #579

Closed

Description

@ajianaz

What problem does this solve?

The owner needs scheduled agent work and zero-token scheduled scripts, hosted either by tole serve or by a system timer, with no daemon to babysit (OpenClaw's weekly-restart tax) and no silent "task never ran" (OpenClaw users).

Proposed solution

On the ledger core (sibling issue), per docs/automation-design.md §4–5, §8:

  • tole cron create "<schedule>" "<prompt>" [--script CMD] [--allow …] [--model …] [--budget-*] [--workdir] [--skill] [--catch-up] [--paused], list (with next_run and zone), status, runs, pause|resume|remove|run|cancel, edit, tick.
  • Concurrent, bounded execution (cron.max_concurrent, default 4); a run is an ordinary durable session.
  • script mode: argv through the run_command machinery, stdout is the result, zero LLM tokens; empty output or [SILENT] delivers nothing.
  • Per-job budgets reuse mission budgets; a global daily token cap; per-job model pin.
  • Validation on save (cron, delivery target, skills, tools): a broken job records blocked and spends no tokens.
  • Delivery targets without channels: session (default), file, command (trust-gated), GET /cron/runs.
  • tole doctor: ticker alive, last tick age, blocked/missed counts.

Alternatives considered

Scheduler in a separate repository (rejected by the owner 2026-11-11); polling reloads (Nakama's missed one-shots).

Are you willing to contribute the implementation?

Yes, I can do it

Before submitting

  • I searched existing issues and didn't find a duplicate

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions