Skip to main content

Tasks vs heartbeat

Fased gives you two scheduling patterns:
  • heartbeat for periodic awareness inside the main session
  • Tasks for exact schedules, reminders, and isolated runs
They overlap a little. Choose based on timing, isolation, and how much main session context the work needs. Both patterns run under an Agent. Scheduled Tasks choose a main or isolated session lane. A channel can receive the result, but the channel is only delivery. For no-model, skill-only, cheap-model, escalation, memory, and budget policy, see Task Operating Layer. For the Tasks v1 completion boundary, see Tasks v1 Freeze.

Quick decision guide

Heartbeat

Heartbeat runs in the main session on an interval, usually every 30 minutes. It is best when the agent should periodically look around, decide what matters, and stay context-aware.

Use heartbeat when

  • several periodic checks can be combined into one pass
  • the task benefits from main-session memory and recent context
  • you want natural suppression when nothing matters
  • exact wall-clock timing is not important

Heartbeat advantages

  • batches inbox, calendar, notifications, and lightweight ops checks together
  • reduces isolated agent turns and token churn
  • has full main-session context
  • can reply HEARTBEAT_OK and stay quiet when there is nothing to say

Example HEARTBEAT.md

Example config

See Heartbeat for the full config surface.

Tasks

Tasks run inside the gateway scheduler and store records under ~/.fased/cron/ internally. They are the right choice when timing must be explicit or when the work should run away from the main session. In the UI, Chat Schedule this, Agent session task rows, and Agent > Tasks all operate on the same scheduled Task records. The /cron route is still routable for compatibility, but normal setup should start from the selected Agent.

Use tasks when

  • the task must run at an exact time
  • the run should be isolated from main-session history
  • you want a different model or thinking level
  • you need a one-shot reminder
  • the task is frequent or noisy enough to avoid the main lane

Task advantages

  • exact at, every, and cron schedules
  • timezone support
  • isolated runs in task-owned lanes such as agent:main:cron:<jobId>:run:<runId>
  • per-task model and thinking overrides
  • direct delivery via announce or webhook modes
  • one-shot reminders with --at

Example: daily briefing

Example: one-shot reminder

See Scheduled Tasks for the full reference.

Fast rule of thumb

Use heartbeat when the question is:
  • “should the agent periodically notice this?”
Use tasks when the question is:
  • “must this happen at this time or as its own run?”

Using both together

A good Fased setup usually combines them. Heartbeat handles:
  • inbox scans
  • calendar awareness
  • quiet-time check-ins
  • lightweight background awareness
Tasks handle:
  • daily briefings
  • weekly reports
  • one-shot reminders
  • isolated heavy analysis
Example split: HEARTBEAT.md
Tasks

Main session vs isolated tasks

Use main-session tasks when

  • the reminder should land inside existing context
  • the next heartbeat should handle it as part of the main lane

Use isolated tasks when

  • you want a clean run
  • you want different model/thinking settings
  • you want direct delivery without adding chat clutter to the main lane

Cost considerations

Practical tips:
  • keep HEARTBEAT.md compact
  • batch related checks into heartbeat instead of many tiny scheduled tasks
  • use isolated tasks for work that deserves its own model or its own delivery path