{% extends "base.html" %} {#- The Schedules page (design 0023): coordinator turns, read-only checks and reminders on the program's clock, the owner's only. Expects: schedules, history (ScheduleRun, newest first), projects, check_profiles, kinds, repeats, max_times, every_min, check_profile, timezone, optional message and error. -#} {%- macro hidden_csrf() -%}{%- endmacro %} {%- macro act(s, action, label, kind="", confirm="") -%}
{{ hidden_csrf() }}
{%- endmacro %} {% macro schedule_fields(s) %}
{% endmacro %} {% block title %}Schedules · relaybay{% endblock %} {% block crumbs %}/Schedules{% endblock %} {% block content %}

Schedules

{% if message %}

{{ message }}

{% endif %} {% if error %}{% endif %}

A clock in the program, in this machine's local time ({{ timezone }}). A coordinator turn is a line in the coordinator's next wake (skipped while no coordinator run is open). A read-only check is a one-shot claude -p without a session, at most 8 steps, under a check profile, in the card's worktree or the project's folder; it waits for a slot like any run, and its answer becomes a report on the card, or an Inbox line without one. A reminder is a tray notification and an Inbox line, no model. A time missed by less than an hour (the program closed, the machine asleep) runs once when it is back; an older one is logged as missed. One run of a schedule at a time.

{% if schedules %}
{% for s in schedules %} {% endfor %}
#KindWhenTargetNextLastBy
{{ s.id }} {{ s.kind }} {{ when_text(s) }} {% if s.task_key %}{{ s.task_key }}{% else %}{{ s.target or "-" }}{% endif %} {% if not s.enabled %}disabled{% elif s.next_at %}{{ s.next_at|local_time }}{% else %}finished{% endif %}{% if s.running %} running{% endif %} {% if s.last %}{{ s.last.outcome or "running" }}{% if s.last.reason %} {{ s.last.reason|truncate(80) }}{% endif %}{% else %}-{% endif %} {{ s.created_by_kind }}{% if s.created_by_kind == "coordinator" %} {{ s.created_by }}{% endif %}
{% else %}

No schedules yet.

{% endif %}
{% for s in schedules %}

Schedule {{ s.id }}: {{ s.kind }}, {{ when_text(s) }}

Made by {{ s.created_by }} ({{ s.created_by_kind }}), changed by {{ s.updated_by }} · ran {{ s.times_run }} time{{ "" if s.times_run == 1 else "s" }} · zone {{ s.timezone }}{% if s.done_at %} · finished {% endif %}

{{ act(s, "disable" if s.enabled else "enable", "Disable" if s.enabled else "Enable") }} {% if not s.running %}{{ act(s, "run", "Run now") }}{% else %}{{ act(s, "stop", "Stop its check", "danger") if s.kind == "check" }}{% endif %} {{ act(s, "delete", "Delete", "danger", "Delete schedule " ~ s.id ~ "? Its runs stay counted in the budgets.") }}
Edit
{{ hidden_csrf() }} {{ schedule_fields(s) }}
{% endfor %}

New schedule

{{ hidden_csrf() }} {{ schedule_fields(none) }}

Runs

{% if history %}
{% for r in history %} {% endfor %}
ScheduleDueOutcomeTokensResult
{{ r.schedule_id }} {{ r.schedule_kind }} {{ r.due_at|local_time }} {{ r.outcome or "running" }} {{ "{:,}".format(r.tokens) if r.tokens else "" }} {% if r.reason %}{{ r.reason }}{% endif %}{% if r.report_id and r.task_key %} report on {{ r.task_key }}{% endif %}{% if r.run_id %} run {{ r.run_id }}{% endif %}{% if r.notice and not r.seen_at %}
{{ hidden_csrf() }}
{% endif %}
{% else %}

No runs yet.

{% endif %}
{% endblock %}