Skip to main content

create

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

INTEGER
Timeframe of traffic considered for autoscaling decisions, in seconds.
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
INTEGER
Number of requests per replica before scaling up.
BOOL
Whether the schedule is enabled. Defaults to true on create.
TEXT
Exclusive end of the window, ISO 8601. One-time schedules only.
INTEGER
Hour the window closes, in the collection timezone. Omit for an hourly schedule that runs every hour. Recurring schedules only.
INTEGER
Minute the window closes. Recurring schedules only.
TEXT
required
Name of the environment (e.g. production).
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
INTEGER
Maximum number of replicas.
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.
INTEGER
Minimum number of replicas.
TEXT
ID of the model.Mutually exclusive with other flags in group model-ref.
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.
TEXT
required
Name of the schedule, unique among the environment’s schedules.
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
INTEGER
Waiting period before scaling down any active replica, in seconds.
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.
INTEGER
Hour the window opens, in the collection timezone. Omit for an hourly schedule that runs every hour. Recurring schedules only.
INTEGER
Minute the window opens. Recurring schedules only.
INTEGER
Target number of in-flight tokens for autoscaling decisions. Early access only.
INTEGER
Target utilization percentage for scaling up and down.
TEXT
Team name or ID. Only valid with —model-name.
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.
TEXT (repeatable)
Weekdays the schedule runs, comma-separated. Recurring schedules only.One of: monday, tuesday, wednesday, thursday, friday, saturday, sunday
BOOL
Enable verbose logging

Examples

Scale up on weekday mornings
Scale up for a one-off launch window

Filter output with --jq

Print the ids of every schedule after the create

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

Remove one autoscaling schedule from an environment, identified by id or by name. Run ‘baseten model environment autoscaling-schedule list’ to see both.

Options

TEXT
required
Name of the environment (e.g. production).
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
ID of the model.Mutually exclusive with other flags in group model-ref.
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.
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT
Stable identifier of the schedule, from ‘autoscaling-schedule list’.Mutually exclusive with other flags in group schedule-ref.
TEXT
Name of the schedule, unique among the environment’s schedules.Mutually exclusive with other flags in group schedule-ref.
TEXT
Team name or ID. Only valid with —model-name.
BOOL
Enable verbose logging

Examples

Delete a schedule by id
Delete a schedule by name

Filter output with --jq

Print the ids that remain

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

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

Options

TEXT
required
Name of the environment (e.g. production).
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
ID of the model.Mutually exclusive with other flags in group model-ref.
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.
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT
Team name or ID. Only valid with —model-name.
BOOL
Enable verbose logging

Examples

List an environment’s schedules

Filter output with --jq

Print each schedule’s id and 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

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

INTEGER
Timeframe of traffic considered for autoscaling decisions, in seconds.
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
INTEGER
Number of requests per replica before scaling up.
BOOL
Whether the schedule is enabled. Pass true or false explicitly; omit the flag to leave this setting unchanged.
TEXT
Exclusive end of the window, ISO 8601. One-time schedules only.
INTEGER
Hour the window closes, in the collection timezone. Omit for an hourly schedule that runs every hour. Recurring schedules only.
INTEGER
Minute the window closes. Recurring schedules only.
TEXT
required
Name of the environment (e.g. production).
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
INTEGER
Maximum number of replicas.
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.
INTEGER
Minimum number of replicas.
TEXT
ID of the model.Mutually exclusive with other flags in group model-ref.
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.
TEXT
New name for the schedule, unique among the environment’s schedules.
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
INTEGER
Waiting period before scaling down any active replica, in seconds.
TEXT
Stable identifier of the schedule, from ‘autoscaling-schedule list’.Mutually exclusive with other flags in group schedule-ref.
TEXT
Name of the schedule, unique among the environment’s schedules.Mutually exclusive with other flags in group schedule-ref.
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.
INTEGER
Hour the window opens, in the collection timezone. Omit for an hourly schedule that runs every hour. Recurring schedules only.
INTEGER
Minute the window opens. Recurring schedules only.
INTEGER
Target number of in-flight tokens for autoscaling decisions. Early access only.
INTEGER
Target utilization percentage for scaling up and down.
TEXT
Team name or ID. Only valid with —model-name.
TEXT (repeatable)
Weekdays the schedule runs, comma-separated. Recurring schedules only.One of: monday, tuesday, wednesday, thursday, friday, saturday, sunday
BOOL
Enable verbose logging

Examples

Raise a schedule’s replica floor
Turn a schedule off without deleting it, naming it instead of using its id
Convert a recurring schedule into a one-time one

Filter output with --jq

Print the resulting schedule names

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

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

TEXT
required
Name of the environment (e.g. production).
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
ID of the model.Mutually exclusive with other flags in group model-ref.
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.
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT
Team name or ID. Only valid with —model-name.
TEXT
required
IANA timezone to apply to every schedule on the environment, for example America/New_York.
BOOL
Enable verbose logging

Examples

Move every schedule to a new timezone

Filter output with --jq

Print the resulting 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.