Skip to main content

Update

Update a scheduled entry.

The command updates only the fields that you give. If nothing changed, it returns Changed: false.

osapi client node schedule update [flags]

Examples​

osapi client node schedule update --target web-01 \
--name backup-daily \
--schedule "0 3 * * *"

Result​

The agent does not keep the --var values of the last deploy. Give each --var key=value again, or the template renders without them.

Flags​

FlagDescriptionDefault
--content-typeContent type: raw or template
--nameName of the scheduled entry to update (required)
--objectNew object to deploy
--scheduleNew cron schedule expression
--userNew user to run the command as
--varTemplate variable as key=value (repeatable)

Global flags​

FlagDescriptionDefault
-d, --debugEnable or disable debug mode
-j, --jsonEnable JSON output
-f, --osapi-filePath to config file/etc/osapi/osapi.yaml
-T, --targetTarget: _all, _any, hostname, or label (group:web.dev)_all
--urlURL the client will connect tohttp://0.0.0.0:8080

Output tells how the result is printed, and what --json gives.