Skip to content
SHC Docs

shc backup schedule set

register a scheduled backup for a scope

Register (or replace) the backup schedule for a scope. The expression is 5-field cron (no seconds field) or an @descriptor (@yearly/@annually, @monthly, @weekly, @daily/@midnight, @hourly, or @every ), interpreted in UTC unless prefixed TZ=. Prose is not accepted; anything the parser rejects returns X400972INVCRN and nothing is written. Avoid the 02:00 hour: retention_cleanup_cron runs at 0 2 * * * on the leader and its prune takes an exclusive repository lock. The schedule is persisted and survives daemon restarts.

shc backup schedule set <cron> [flags]
shc backup schedule set "30 3 * * *" --scope stack -s myblog
shc backup schedule set "@daily" --scope tenant -t default
shc backup schedule set "@hourly" --scope stack -s myblog --all-connected
--all-connected also back up each matched stack's integration-graph peers, with the same consistency_id and separate pause windows; this is not a .bkg group, which only shc backup create --all-connected writes
-h, --help help for set
--scope string scope level (global|tenant|environment|stack|deployment) (default "stack")
-s, --stack string stack name (for stack/deployment scopes)
--with-dependants also back up the deployments that depend on each matched deployment (same caveat as --all-connected)
--config stringArray extra YAML config file to layer on top of auto-discovered config; repeatable, later files win
-d, --debug enable debug mode (default: $SHC_DEBUG)
-e, --environment string environment name (default: "prod", or "default" on an estate with no licence and no trial; $SHC_ENVIRONMENT and shc ctx -e override it, and the "master" tenant is always "default")
--exclude string comma-separated dotted paths to drop
--fields string comma-separated columns/keys to show (and their order)
--filter string comma-separated dotted paths to keep (drops everything else)
-o, --output string output format: tty|text|json|yaml (default: $SHC_OUTPUT)
-t, --tenant string tenant name (default: $SHC_TENANT)
-v, --verbose verbose output (default: $SHC_VERBOSE)