# Run by schedule name | DRE

> Name a timing once and share it; your orchestrator runs dre run --schedule, and a rerun renders the same SQL.

[← All use cases](https://getdre.com/#use-cases)

# Run by schedule name

DRE doesn’t fire schedules itself; cron, Airflow, Dagster or Databricks Jobs does. schedules.yml gives each schedule a name, the report (and Set) it runs, when it runs and its variables, and timings.yml names a timing once (“the 1st of the month, 06:00 Sydney”) for every client that shares it. The orchestrator’s only job is to call one command.

Recorded from a real run: a shared timing, the schedule that uses it, and the scheduled run.

Recorded from a real run: a shared timing, the schedule that uses it, and the scheduled run.

[↓ Download the statement this run wrote (xlsx)](https://getdre.com/media/downloads/client_a-close_client_a-20261001.xlsx)

timings.yml

```yaml
month_start_sydney:
  cron: "0 6 1 * *"
  timezone: Australia/Sydney
  except: ["2026-01-01"]       # no close on New Year's Day
```

schedules.yml

```yaml
- name: close_client_a
  report: client_statement
  set: client_a
  timing: month_start_sydney
  vars: {period: last_month}
- name: close_client_b
  report: client_statement
  set: client_b
  timing: month_start_sydney
  vars: {period: last_month}
- name: formats_weekly
  select: "tag:formats"          # every report with the tag
  rrule: "FREQ=WEEKLY;BYDAY=MO;BYHOUR=5"
  vars: {period: last_week}
- name: flash_legacy
  report: sales_flash
  cron: "0 4 * * *"
  enabled: false                 # paused
```

terminal

```bash
# Which reports and Sets does a schedule run? (--output json is for tools)
dre ls --schedule close_client_a

# What the orchestrator runs. DRE_RUN_AT is the instant it was scheduled for,
# so a late run or a rerun renders the same SQL.
DRE_RUN_AT=2026-09-30T20:00:00Z dre run --schedule close_client_a
```

### What to notice

-   A timing can be a cron expression, an iCalendar rule or “every N days”, with dates to skip or add.
-   Shared timings live in timings.yml: change “month start” once, for every client.
-   A schedule targets one report and Set, or a selector such as a tag, and can be paused with enabled: false.
-   The schedule’s variables sit above the report’s and below --var, and SQL can read run.schedule and run.scheduled\_at.
-   Results, logs and run\_results.json record the schedule, the scheduled instant and every variable the run used.

### In the docs

-   [Schedules →](https://getdre.com/docs/schedules/)
-   [timings.yml reference →](https://getdre.com/docs/reference-timings/)
