> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baseten.co/llms.txt
> Use this file to discover all available pages before exploring further.

# baseten model environment autoscaling-schedule

> Manage an environment's autoscaling schedules

## create

```sh theme={"system"}
baseten model environment autoscaling-schedule create [OPTIONS]
```

Add one autoscaling schedule to an environment.

\--cadence selects the schedule's shape. 'daily' and 'hourly' are recurring and need --weekdays and a minute window; 'one-time' runs once and needs --start-at and --end-at instead.

\--min-replica and --max-replica are required. Any other autoscaling flag you omit is inherited from the environment while the schedule is active.

\--timezone is required for the first schedule on an environment, since the timezone is shared by the whole collection and has no default. Afterwards it is optional and must match the existing one; use 'update-settings' to change it for every schedule at once.

Run 'baseten model environment describe' to see the current values.

### Options

<ParamField body="--autoscaling-window" type="INTEGER">
  Timeframe of traffic considered for autoscaling decisions, in seconds.
</ParamField>

<ParamField body="--cadence" type="TEXT" required>
  Shape of the schedule. Recurring schedules use --weekdays and a minute window; one-time schedules use --start-at and --end-at.

  One of: `daily`, `hourly`, `one-time`
</ParamField>

<ParamField body="--concurrency-target" type="INTEGER">
  Number of requests per replica before scaling up.
</ParamField>

<ParamField body="--enabled" type="BOOL">
  Whether the schedule is enabled. Defaults to true on create.
</ParamField>

<ParamField body="--end-at" type="TEXT">
  Exclusive end of the window, ISO 8601. One-time schedules only.
</ParamField>

<ParamField body="--end-hour" type="INTEGER">
  Hour the window closes, in the collection timezone. Omit for an hourly schedule that runs every hour. Recurring schedules only.
</ParamField>

<ParamField body="--end-minute" type="INTEGER">
  Minute the window closes. Recurring schedules only.
</ParamField>

<ParamField body="--environment" type="TEXT" required>
  Name of the environment (e.g. production).
</ParamField>

<ParamField body="-q, --jq" type="TEXT">
  Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
</ParamField>

<ParamField body="--max-replica" type="INTEGER">
  Maximum number of replicas.
</ParamField>

<ParamField body="--max-scale-down-rate" type="INTEGER">
  Maximum percentage of replicas that can be removed per autoscaling window (1-50). For example, 20 means at most 20% of replicas are removed per window.
</ParamField>

<ParamField body="--min-replica" type="INTEGER">
  Minimum number of replicas.
</ParamField>

<ParamField body="--model-id" type="TEXT">
  ID of the model.

  Mutually exclusive with other flags in group `model-ref`.
</ParamField>

<ParamField body="--model-name" type="TEXT">
  Name of the model. Use --team to disambiguate when the same name exists in multiple teams.

  Mutually exclusive with other flags in group `model-ref`.
</ParamField>

<ParamField body="--name" type="TEXT" required>
  Name of the schedule, unique among the environment's schedules.
</ParamField>

<ParamField body="-o, --output" type="TEXT" default="text">
  Output format

  One of: `text`, `json`, `jsonl`, `none`
</ParamField>

<ParamField body="--profile" type="TEXT">
  Use a specific stored profile for this command, overriding BASETEN\_PROFILE and the current profile
</ParamField>

<ParamField body="--scale-down-delay" type="INTEGER">
  Waiting period before scaling down any active replica, in seconds.
</ParamField>

<ParamField body="--start-at" type="TEXT">
  Inclusive start of the window, ISO 8601 (for example 2026-09-01T08:00). Values without a timezone designator are read in the local timezone. Must be in the future. One-time schedules only.
</ParamField>

<ParamField body="--start-hour" type="INTEGER">
  Hour the window opens, in the collection timezone. Omit for an hourly schedule that runs every hour. Recurring schedules only.
</ParamField>

<ParamField body="--start-minute" type="INTEGER">
  Minute the window opens. Recurring schedules only.
</ParamField>

<ParamField body="--target-in-flight-tokens" type="INTEGER">
  Target number of in-flight tokens for autoscaling decisions. Early access only.
</ParamField>

<ParamField body="--target-utilization-percentage" type="INTEGER">
  Target utilization percentage for scaling up and down.
</ParamField>

<ParamField body="--team" type="TEXT">
  Team name or ID. Only valid with --model-name.
</ParamField>

<ParamField body="--timezone" type="TEXT">
  IANA timezone shared by every schedule on the environment, for example America/New\_York. Required for the first schedule; afterwards it must match the existing one.
</ParamField>

<ParamField body="--weekdays" type="TEXT (repeatable)">
  Weekdays the schedule runs, comma-separated. Recurring schedules only.

  One of: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`
</ParamField>

<ParamField body="-v, --verbose" type="BOOL">
  Enable verbose logging
</ParamField>

### Examples

Scale up on weekday mornings

```sh theme={"system"}
baseten model environment autoscaling-schedule create --model-id <model-id> --environment production --name weekday-peak --cadence daily --weekdays monday,tuesday,wednesday,thursday,friday --start-hour 8 --start-minute 0 --end-hour 18 --end-minute 0 --timezone America/New_York --min-replica 4 --max-replica 20
```

Scale up for a one-off launch window

```sh theme={"system"}
baseten model environment autoscaling-schedule create --model-id <model-id> --environment production --name launch --cadence one-time --start-at 2026-09-01T08:00 --end-at 2026-09-01T20:00 --timezone America/New_York --min-replica 10 --max-replica 50
```

### Filter output with `--jq`

Print the ids of every schedule after the create

```sh theme={"system"}
baseten model environment autoscaling-schedule create --model-id <model-id> --environment production --name weekday-peak --cadence daily --weekdays monday --start-minute 0 --end-minute 0 --timezone UTC --min-replica 1 --max-replica 2 --jq '.environment.autoscaling_schedules.schedules[].id'
```

### Output

**Text mode (`--output text`):** On success, prints "Created autoscaling schedule `name`" to stderr; no stdout output.

**JSON mode (`--output json`):** payload type `managementapi.UpdateEnvironmentResponse`.

## delete

```sh theme={"system"}
baseten model environment autoscaling-schedule delete [OPTIONS]
```

Remove one autoscaling schedule from an environment, identified by id or by name.

Run 'baseten model environment autoscaling-schedule list' to see both.

### Options

<ParamField body="--environment" type="TEXT" required>
  Name of the environment (e.g. production).
</ParamField>

<ParamField body="-q, --jq" type="TEXT">
  Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
</ParamField>

<ParamField body="--model-id" type="TEXT">
  ID of the model.

  Mutually exclusive with other flags in group `model-ref`.
</ParamField>

<ParamField body="--model-name" type="TEXT">
  Name of the model. Use --team to disambiguate when the same name exists in multiple teams.

  Mutually exclusive with other flags in group `model-ref`.
</ParamField>

<ParamField body="-o, --output" type="TEXT" default="text">
  Output format

  One of: `text`, `json`, `jsonl`, `none`
</ParamField>

<ParamField body="--profile" type="TEXT">
  Use a specific stored profile for this command, overriding BASETEN\_PROFILE and the current profile
</ParamField>

<ParamField body="--schedule-id" type="TEXT">
  Stable identifier of the schedule, from 'autoscaling-schedule list'.

  Mutually exclusive with other flags in group `schedule-ref`.
</ParamField>

<ParamField body="--schedule-name" type="TEXT">
  Name of the schedule, unique among the environment's schedules.

  Mutually exclusive with other flags in group `schedule-ref`.
</ParamField>

<ParamField body="--team" type="TEXT">
  Team name or ID. Only valid with --model-name.
</ParamField>

<ParamField body="-v, --verbose" type="BOOL">
  Enable verbose logging
</ParamField>

### Examples

Delete a schedule by id

```sh theme={"system"}
baseten model environment autoscaling-schedule delete --model-id <model-id> --environment production --schedule-id <schedule-id>
```

Delete a schedule by name

```sh theme={"system"}
baseten model environment autoscaling-schedule delete --model-id <model-id> --environment production --schedule-name weekday-peak
```

### Filter output with `--jq`

Print the ids that remain

```sh theme={"system"}
baseten model environment autoscaling-schedule delete --model-id <model-id> --environment production --schedule-id <schedule-id> --jq '.environment.autoscaling_schedules.schedules[].id'
```

### Output

**Text mode (`--output text`):** On success, prints "Deleted autoscaling schedule `id`" to stderr; no stdout output.

**JSON mode (`--output json`):** payload type `managementapi.UpdateEnvironmentResponse`.

## list

```sh theme={"system"}
baseten model environment autoscaling-schedule list [OPTIONS]
```

List every autoscaling schedule on an environment with its id, which the update and delete commands take.

### Options

<ParamField body="--environment" type="TEXT" required>
  Name of the environment (e.g. production).
</ParamField>

<ParamField body="-q, --jq" type="TEXT">
  Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
</ParamField>

<ParamField body="--model-id" type="TEXT">
  ID of the model.

  Mutually exclusive with other flags in group `model-ref`.
</ParamField>

<ParamField body="--model-name" type="TEXT">
  Name of the model. Use --team to disambiguate when the same name exists in multiple teams.

  Mutually exclusive with other flags in group `model-ref`.
</ParamField>

<ParamField body="-o, --output" type="TEXT" default="text">
  Output format

  One of: `text`, `json`, `jsonl`, `none`
</ParamField>

<ParamField body="--profile" type="TEXT">
  Use a specific stored profile for this command, overriding BASETEN\_PROFILE and the current profile
</ParamField>

<ParamField body="--team" type="TEXT">
  Team name or ID. Only valid with --model-name.
</ParamField>

<ParamField body="-v, --verbose" type="BOOL">
  Enable verbose logging
</ParamField>

### Examples

List an environment's schedules

```sh theme={"system"}
baseten model environment autoscaling-schedule list --model-id <model-id> --environment production
```

### Filter output with `--jq`

Print each schedule's id and name

```sh theme={"system"}
baseten model environment autoscaling-schedule list --model-id <model-id> --environment production --jq '.schedules[] | "\(.id) \(.name)"'
```

### Output

**Text mode (`--output text`):** Table with columns: ID, NAME, CADENCE, ENABLED, WINDOW, REPLICAS. When no schedules exist, prints "No autoscaling schedules found." to stderr.

**JSON mode (`--output json`):** payload type `managementapi.EnvironmentAutoscalingSchedules`.

## update

```sh theme={"system"}
baseten model environment autoscaling-schedule update [OPTIONS]
```

Change one autoscaling schedule, identified by id or by name.

Only the flags you pass are changed; the rest of the schedule is preserved. Because the API replaces a schedule wholesale, the command reads the environment first and merges your changes into the existing schedule.

Pass --cadence to change a schedule's shape. The new shape's timing flags are then required, since a recurring window and a one-time interval have nothing in common to carry over; the name, enabled state, and autoscaling overrides carry over either way.

\--timezone is not accepted here, because it belongs to the whole collection; use 'update-settings'.

### Options

<ParamField body="--autoscaling-window" type="INTEGER">
  Timeframe of traffic considered for autoscaling decisions, in seconds.
</ParamField>

<ParamField body="--cadence" type="TEXT">
  New shape for the schedule. Changing it requires the new shape's timing flags, since there is nothing to carry over.

  One of: `daily`, `hourly`, `one-time`
</ParamField>

<ParamField body="--concurrency-target" type="INTEGER">
  Number of requests per replica before scaling up.
</ParamField>

<ParamField body="--enabled" type="BOOL">
  Whether the schedule is enabled. Pass `true` or `false` explicitly; omit the flag to leave this setting unchanged.
</ParamField>

<ParamField body="--end-at" type="TEXT">
  Exclusive end of the window, ISO 8601. One-time schedules only.
</ParamField>

<ParamField body="--end-hour" type="INTEGER">
  Hour the window closes, in the collection timezone. Omit for an hourly schedule that runs every hour. Recurring schedules only.
</ParamField>

<ParamField body="--end-minute" type="INTEGER">
  Minute the window closes. Recurring schedules only.
</ParamField>

<ParamField body="--environment" type="TEXT" required>
  Name of the environment (e.g. production).
</ParamField>

<ParamField body="-q, --jq" type="TEXT">
  Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
</ParamField>

<ParamField body="--max-replica" type="INTEGER">
  Maximum number of replicas.
</ParamField>

<ParamField body="--max-scale-down-rate" type="INTEGER">
  Maximum percentage of replicas that can be removed per autoscaling window (1-50). For example, 20 means at most 20% of replicas are removed per window.
</ParamField>

<ParamField body="--min-replica" type="INTEGER">
  Minimum number of replicas.
</ParamField>

<ParamField body="--model-id" type="TEXT">
  ID of the model.

  Mutually exclusive with other flags in group `model-ref`.
</ParamField>

<ParamField body="--model-name" type="TEXT">
  Name of the model. Use --team to disambiguate when the same name exists in multiple teams.

  Mutually exclusive with other flags in group `model-ref`.
</ParamField>

<ParamField body="--name" type="TEXT">
  New name for the schedule, unique among the environment's schedules.
</ParamField>

<ParamField body="-o, --output" type="TEXT" default="text">
  Output format

  One of: `text`, `json`, `jsonl`, `none`
</ParamField>

<ParamField body="--profile" type="TEXT">
  Use a specific stored profile for this command, overriding BASETEN\_PROFILE and the current profile
</ParamField>

<ParamField body="--scale-down-delay" type="INTEGER">
  Waiting period before scaling down any active replica, in seconds.
</ParamField>

<ParamField body="--schedule-id" type="TEXT">
  Stable identifier of the schedule, from 'autoscaling-schedule list'.

  Mutually exclusive with other flags in group `schedule-ref`.
</ParamField>

<ParamField body="--schedule-name" type="TEXT">
  Name of the schedule, unique among the environment's schedules.

  Mutually exclusive with other flags in group `schedule-ref`.
</ParamField>

<ParamField body="--start-at" type="TEXT">
  Inclusive start of the window, ISO 8601 (for example 2026-09-01T08:00). Values without a timezone designator are read in the local timezone. Must be in the future. One-time schedules only.
</ParamField>

<ParamField body="--start-hour" type="INTEGER">
  Hour the window opens, in the collection timezone. Omit for an hourly schedule that runs every hour. Recurring schedules only.
</ParamField>

<ParamField body="--start-minute" type="INTEGER">
  Minute the window opens. Recurring schedules only.
</ParamField>

<ParamField body="--target-in-flight-tokens" type="INTEGER">
  Target number of in-flight tokens for autoscaling decisions. Early access only.
</ParamField>

<ParamField body="--target-utilization-percentage" type="INTEGER">
  Target utilization percentage for scaling up and down.
</ParamField>

<ParamField body="--team" type="TEXT">
  Team name or ID. Only valid with --model-name.
</ParamField>

<ParamField body="--weekdays" type="TEXT (repeatable)">
  Weekdays the schedule runs, comma-separated. Recurring schedules only.

  One of: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`
</ParamField>

<ParamField body="-v, --verbose" type="BOOL">
  Enable verbose logging
</ParamField>

### Examples

Raise a schedule's replica floor

```sh theme={"system"}
baseten model environment autoscaling-schedule update --model-id <model-id> --environment production --schedule-id <schedule-id> --min-replica 6
```

Turn a schedule off without deleting it, naming it instead of using its id

```sh theme={"system"}
baseten model environment autoscaling-schedule update --model-id <model-id> --environment production --schedule-name weekday-peak --enabled false
```

Convert a recurring schedule into a one-time one

```sh theme={"system"}
baseten model environment autoscaling-schedule update --model-id <model-id> --environment production --schedule-name weekday-peak --cadence one-time --start-at 2026-09-01T08:00 --end-at 2026-09-01T20:00
```

### Filter output with `--jq`

Print the resulting schedule names

```sh theme={"system"}
baseten model environment autoscaling-schedule update --model-id <model-id> --environment production --schedule-id <schedule-id> --min-replica 6 --jq '.environment.autoscaling_schedules.schedules[].name'
```

### Output

**Text mode (`--output text`):** On success, prints "Updated autoscaling schedule `id`" to stderr; no stdout output.

**JSON mode (`--output json`):** payload type `managementapi.UpdateEnvironmentResponse`.

## update-settings

```sh theme={"system"}
baseten model environment autoscaling-schedule update-settings [OPTIONS]
```

Change the settings shared by all of an environment's autoscaling schedules. Today that is only the timezone.

Setting the timezone rewrites every existing schedule, which is why it lives here rather than on 'update'. The environment must already have at least one schedule, since the timezone is stored per schedule.

Run 'baseten model environment autoscaling-schedule list' to see the schedules this affects.

### Options

<ParamField body="--environment" type="TEXT" required>
  Name of the environment (e.g. production).
</ParamField>

<ParamField body="-q, --jq" type="TEXT">
  Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
</ParamField>

<ParamField body="--model-id" type="TEXT">
  ID of the model.

  Mutually exclusive with other flags in group `model-ref`.
</ParamField>

<ParamField body="--model-name" type="TEXT">
  Name of the model. Use --team to disambiguate when the same name exists in multiple teams.

  Mutually exclusive with other flags in group `model-ref`.
</ParamField>

<ParamField body="-o, --output" type="TEXT" default="text">
  Output format

  One of: `text`, `json`, `jsonl`, `none`
</ParamField>

<ParamField body="--profile" type="TEXT">
  Use a specific stored profile for this command, overriding BASETEN\_PROFILE and the current profile
</ParamField>

<ParamField body="--team" type="TEXT">
  Team name or ID. Only valid with --model-name.
</ParamField>

<ParamField body="--timezone" type="TEXT" required>
  IANA timezone to apply to every schedule on the environment, for example America/New\_York.
</ParamField>

<ParamField body="-v, --verbose" type="BOOL">
  Enable verbose logging
</ParamField>

### Examples

Move every schedule to a new timezone

```sh theme={"system"}
baseten model environment autoscaling-schedule update-settings --model-id <model-id> --environment production --timezone Europe/Berlin
```

### Filter output with `--jq`

Print the resulting timezone

```sh theme={"system"}
baseten model environment autoscaling-schedule update-settings --model-id <model-id> --environment production --timezone Europe/Berlin --jq '.environment.autoscaling_schedules.timezone'
```

### Output

**Text mode (`--output text`):** On success, prints "Updated autoscaling schedule settings" to stderr; no stdout output.

**JSON mode (`--output json`):** payload type `managementapi.UpdateEnvironmentResponse`.
