Threads AI

Schedule

A cron schedule on a host.

A schedule keeps one thread, created at its first occurrence, and each occurrence continues it: fired (a run of the agent with input), or skipped as missed (it fell due while no host ran), overlap (the previous run was still going) or removed (its agent is no longer served, or now pins another config than the thread was started with). A thread's pinned config never changes, so when the schedule's agent or that agent's config changes, the next occurrence starts a new thread once the old thread's run has finished (until then it is an overlap there); changing only the cron, timezone or input keeps the thread. Every decided occurrence is logged on that thread with occurrence id <id>@<scheduled instant, RFC 3339 UTC with milliseconds>. An occurrence is reserved when due with the agent, input and timezone of that moment, so a reservation still fires after its schedule is removed; one whose thread is deleted before it is decided is dropped and never logged.

Fields

idNamerequired

The schedule's name: lowercase letters, digits and underscores, up to 64 characters. Each firing records it, and the run's principal is issuer "schedule" with this as subject.

agentstringrequired

A key of host({agents}).

cronstringrequired

A five-field cron expression (minute, hour, day of month, month, day of week, where 0 or 7 is Sunday) of numbers, *, lists, ranges and steps, read in timezone. Anything else is a ConfigError invalid_config.

timezonestringdefault UTC

IANA name.

inputInputrequired

What a run starts with: plain text or ordered input parts.

Edit on GitHub

On this page