Vibe Coding
Back to FastClaw

FastClaw / Ability level

scheduler

FastClaw has a built-in Cron scheduler that allows the Agent to trigger tasks based on time and create, list, and delete scheduled tasks in sessions.

scheduler key concepts infographic
scheduler key concepts infographic

How does Cron run?

The cron scheduler is loaded from the DB when the Gateway starts. The existence of the channel will be checked before scheduling is triggered; if it continues to fail, failure_count will accumulate and eventually be cleared.

1

Create plan

Dashboard, API, or tool create_cron_job creates a job.

2

Trigger on point

Scheduler selects the channel and Agent and sends the task to the queue.

3

Agent execution

The Agent loop is handled as a normal session, except that the input comes from scheduled tasks.

4

Failure handling

The number of failures increases. If the number exceeds the policy, clean it up or wait for manual repair.

In-session tools

Create_cron_job, list_cron_jobs, delete_cron_job are registered in the source code. Agent can help users set reminders, inspections, daily reports or periodic automation when they have permission.

  • Suitable for daily reports, weekly reports, inspections, and regular summaries.
  • Sensitive automation requires restricting prompt, channel, and tool permissions.
  • Cron input should be short and clear to avoid leaving the Agent performing open-ended tasks for long periods of time.

Time zones and preferences

Agent also registers tools such as set_timezone and set_preference. It is best to explicitly write the time zone for scheduled tasks to avoid inconsistencies between the user location, server time zone and channel time zone.

Every day at 09:00 (Asia/Hong_Kong), yesterday’s failed deployment tasks are summarized and sent to the Slack channel.