komrad

get_schedule

Get one schedule by id, with its prompt in full.

read-onlyidempotentMCP toolSchedule

Calling it#

curl -X POST http://127.0.0.1:8787/komrad.schedule.v1.ScheduleService/GetSchedule \
  -H 'Content-Type: application/json' \
  -d '{
  "id": "<id>"
}'

Request#

GetScheduleRequest#

FieldTypeDescription
iduuid*

The schedule to get, by id.

Response#

GetScheduleResponse#

FieldTypeDescription
scheduleSchedule

The schedule, with its prompt in full.

Types#

Schedule#

Schedule is a cron expression that creates a task or mails an orchestrator each time it matches.

FieldTypeDescription
iduuid*

The schedule's id.

namestring

The schedule's name.

cronstring

The schedule's cron expression, in five fields.

timezonestring

The timezone the cron expression is read in. Empty uses the machine's timezone.

enabledbool

Whether the schedule is enabled. A disabled schedule keeps its record and never runs.

promptstring

The prompt each launched writer starts with, or the mail sent to the orchestrator.

workflow_iduuid*

The id of the workflow the schedule belongs to. For an orchestrator schedule, the orchestrator's workflow.

kindScheduleKind

Whether the schedule creates a task or mails an orchestrator.

orchestrator_agent_iduuid

The id of the orchestrator the schedule mails. Set only on an orchestrator schedule.

next_run_attimestamp

When the cron expression next matches. Unset while the schedule is disabled.

latest_runScheduleRun

The schedule's newest run. Unset when the schedule has never run or the run's record has expired.

recent_runsScheduleRun[]

The schedule's newest runs, newest first. Set only in Watch events.

archived_attimestamp

When the schedule was archived. Unset while the schedule is live.

ScheduleRun#

ScheduleRun is one time a schedule's cron expression matched, with its state.

FieldTypeDescription
idint64

The run's id. A higher id is a newer run.

scheduled_fortimestamp

The time the cron expression matched for this run.

stateScheduleRunState

The run's state.

attemptint32

The run's current attempt, counting from one once the run has started.

max_attemptsint32

How many attempts the run has before it is discarded.

finalized_attimestamp

When the run finished. Unset while the run is waiting or running.

messagestring

Why the run was skipped, or the error from its last failed attempt. Empty when the run completed.

ScheduleKind#

ScheduleKind is what a schedule does each time its cron expression matches.

ValueDescription
orchestrator

Mails the prompt to a running orchestrator.

task

Creates a task in the workflow and launches its writer with the prompt.

ScheduleRunState#

ScheduleRunState is the state of one schedule run.

ValueDescription
available

Waiting to start.

pending

Held back until something releases the run.

scheduled

Waiting for a later time to start.

running

Running now.

retryable

Failed an attempt and waiting to try again.

completed

Launched the run's agent or sent the run's mail.

cancelled

Skipped, with the reason in the run's message.

discarded

Out of attempts, with the last error in the run's message.