pulumi stack schedule new | CLI commands
Generated for Pulumi CLI v3.245.0.
[EXPERIMENTAL] Create a scheduled deployment action for a stack
Synopsis
[EXPERIMENTAL] Create a scheduled deployment action for a stack.
The –kind flag selects the schedule type: raw — runs a Pulumi operation on a cron or one-time schedule. Requires –operation and exactly one of –cron or –once. drift — runs drift detection on a cron schedule. Requires –cron. Use –auto-remediate to fix detected drift. ttl — destroys the stack at a one-time timestamp. Requires –once. Use –delete-after-destroy to also delete the stack from Pulumi Cloud after destroy.
When run interactively, prompts for required values that aren’t provided via flags. Pass –yes to fail fast on missing values instead of prompting.
The stack must have deployment settings configured before a schedule can be created.
pulumi stack schedule new [flags]
Examples
# Walk through prompts to create a schedule
pulumi stack schedule new
# Raw: refresh every 4 hours
pulumi stack schedule new --kind raw --operation refresh --cron '0 */4 * * *'
# Drift detection every 4 hours, auto-remediating any drift found
pulumi stack schedule new --kind drift --cron '0 */4 * * *' --auto-remediate
# TTL: destroy the stack on Jan 1 and remove it from Pulumi Cloud after
pulumi stack schedule new --kind ttl --once 2027-01-01T00:00:00Z --delete-after-destroy
Options
--auto-remediate (drift only) Automatically run a remediation update when drift is detected
--cron string Cron expression for recurring executions, evaluated in UTC (e.g. '0 */4 * * *')
--delete-after-destroy (ttl only) Delete the stack from Pulumi Cloud after successfully destroying its resources
-h, --help help for new
--kind string Schedule kind (required). One of: raw, drift, ttl
--once string ISO 8601 timestamp for a one-time execution (e.g. '2026-12-31T23:59:00Z')
--operation string (raw only) Pulumi operation to run. One of: update, preview, refresh, destroy
--output string Output format. Supported values are: default and json (default "default")
-s, --stack string The name of the stack to operate on. Defaults to the current stack
-y, --yes Skip prompts; fail if any required value is missing
Options inherited from parent commands
--color string Colorize output. Choices are: always, never, raw, auto (default "auto")
-C, --cwd string Run pulumi as if it had been started in another directory
--disable-integrity-checking Disable integrity checking of checkpoint files
-e, --emoji Enable emojis in the output
-Q, --fully-qualify-stack-names Show fully-qualified stack names
--logflow Flow log settings to child processes (like plugins)
--logtostderr Log to stderr instead of to files
--memprofilerate int Enable more precise (and expensive) memory allocation profiles by setting runtime.MemProfileRate
--non-interactive Disable interactive mode for all commands
--otel-traces string Export OpenTelemetry traces to the specified endpoint. Use file:// for local JSON files, grpc:// for remote collectors
--profiling string Emit CPU and memory profiles and an execution trace to '[filename].[pid].{cpu,mem,trace}', respectively
--tracing file: Emit tracing to the specified endpoint. Use the file: scheme to write tracing data to a local file
-v, --verbose int Enable verbose logging (e.g., v=3); anything >3 is very verbose
SEE ALSO
- pulumi stack schedule - [EXPERIMENTAL] Manage scheduled deployment actions for a stack.
Thank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.