---
id: w5/m11/t002
title: Add cron-specific Deploy section — Schedule (cron expression, read-only) + Command display
worker: worker5
status: done
estimate: 45m
depends_on: [w5/m11/t001]
---

## Objective

After hiding the web-service-only controls (t001), the cron Settings page is missing the controls that actually apply: the cron **Schedule** expression (e.g. `*/15 * * * *`) and the **Command** (the shell command Render runs on each tick). Add a "Deploy" card to the cron Settings page showing both fields, read-only for now (editing is a follow-on), matching Render's Deploy section layout.

## Context

- Render's cron settings Deploy section (captured 2026-07-09): Schedule field with cron expression + a label "Run this command as a cron expression"; Command field with the shell command; Build Command field (optional, for pre-run build step); Auto Deploy toggle
- bex's `App` CR has `spec.schedule` (cron expression) — verify the field name in `lego/types/v1alpha1/app_types.go`
- The bex-api `server` GraphQL query must expose `schedule` and `command` on the service object — check `lego/backend/internal/graphql/` and `lego/backend/internal/store/` for existing field mapping
- The local-bex stub's `nightly-report` fixture in `dashboard/scripts/local-bex.mjs` must include `schedule` and `command` fields for visual development

## Steps

1. Check `lego/types/v1alpha1/app_types.go` for `spec.schedule` and `spec.command` fields; note exact names
2. Check `lego/backend/internal/graphql/schema.graphql` (or similar) for `schedule`/`command` on the `Server` type — add if absent (follow existing `Database` field pattern)
3. Add `schedule` and `command` to the local-bex stub's cron fixture in `dashboard/scripts/local-bex.mjs`
4. In the Settings route, add a "Deploy" card below the Settings card (only when `type === 'cron_job'`) with:
   - Schedule: display the cron expression with a small helper text ("Runs on this schedule: …")
   - Command: display the shell command in a monospace `<code>` block
5. Match Render's visual weight: section header "Deploy", two rows (Schedule, Command), each with a label + read-only value + a future Edit affordance placeholder

## Files

- `dashboard/src/routes/services/$serviceId/settings.tsx`
- `dashboard/scripts/local-bex.mjs` (add schedule + command to cron fixture)
- `lego/backend/internal/graphql/` (if schema change needed)
- `lego/types/v1alpha1/app_types.go` (read-only — check field names)

## Acceptance criteria

- [ ] `/services/nightly-report/settings` shows a "Deploy" section with Schedule and Command
- [ ] Schedule shows the cron expression from the stub fixture (e.g. `*/15 * * * *`)
- [ ] Command shows the shell command from the stub fixture
- [ ] The Deploy section is absent on a web service's Settings page
- [ ] No TypeScript errors

## Out of scope

- Editable Schedule / Command (write path is a follow-on milestone)
- Build Command, Auto Deploy, Log Stream, Notifications (Render has these; bex defers them)
