Skip to main content

Update a cron entry

PUT 

/node/:hostname/schedule/cron/:name

Update an existing cron drop-in entry on the target node.

Request

Path Parameters

    hostname stringrequired

    Possible values: non-empty

    Target agent hostname, reserved routing value (_any, _all), or label selector (key:value).

    name stringrequired

    Possible values: non-empty, Value must match regular expression ^[a-zA-Z0-9_-]+$

    Cron entry name. Must contain only alphanumeric characters, underscores, and hyphens.

Body

required

Cron entry update parameters.

    object string

    New object to deploy (redeploy with updated content).

    schedule string

    Cron schedule expression (e.g., "*/5 * * * *").

    user string

    User to run the command as.

    content_type string

    Possible values: [raw, template]

    Content type: "raw" or "template".

    vars

    object

    Template variables.

    property name* any

    Template variables.

Responses

Cron entry updated.

Schema

    job_id uuid

    The job ID used to process this request.

    results

    object[]

    required

  • Array [

  • hostname stringrequired

    Hostname of the agent that processed this operation.

    status stringrequired

    Possible values: [ok, failed, skipped]

    The status of the operation for this host.

    name string

    Cron entry name.

    changed boolean

    Whether the operation modified system state.

    error string

    Error message if the agent failed.

  • ]

Loading...