# Schedule a Workflow

> Build a CF Workflow — multi-day durable orchestration with sleeps + retries that survive redeploys.

- **Kind**: Shell tool
- **Category**: engineering
- **Owner**: Sentinel (/sentinel)
- **Default model**: sonnet
- **Cost class**: standard (Sonnet-class model. Default for most skills.)
- **Turn budget**: 10
- **Execution**: synchronous (result lands in the same turn)
- **Canonical URL**: https://app.51ultron.com/docs/skills/schedule-workflow

## What it does

Implements workflows/SKILL.md. Scaffolds a Cloudflare Workflow that runs on a schedule, sleeps arbitrary durations between steps (hours, days, weeks), retries failed steps with backoff, and resumes after Worker redeploys. Each step must be idempotent (re-running it produces the same result). Best for slow pipelines, daily digests, multi-day onboarding sequences, retry-tomorrow-on-failure jobs.

## When to use this

- user wants something to run daily / weekly / on a cadence
- user says 'run this every morning' / 'schedule this workflow' / 'do X then sleep a day then Y'
- pipeline needs to retry on failure with backoff

## When NOT to use this

- user wants a one-shot task → just run it
- the schedule is intra-second / sub-minute → use a Durable Object alarm or queue instead
- user wants an autonomous agent on the agent-runtime → use build-agent

## Example prompts

- `schedule a daily digest of competitor news at 9am UTC`
- `build a workflow that emails the user every Monday with last week's metrics`
- `run scraper, sleep 1 day, summarize, sleep 1 day, send report`

## Inputs

- **purpose**: what the workflow does in one sentence
- **cadence**: how often it runs (e.g. '@daily 9am UTC')

## Output

Workflow file path in /work + deploy instructions + the cron trigger config.

## Tools used

`shell_exec`, `shell_write`

## Execution template

Shell tools dispatch through `shell_exec` with the following command template:

```bash
follow workflows/SKILL.md; scaffold a Workflow with {{cadence}} for {{purpose}}
```

## Tags

`engineering`, `workflow`, `schedule`

## Keywords

workflow, schedule, cron, daily, weekly, durable, retry, sleep

