---
source: https://qlik.dev/toolkits/qlik-cli/scheduling/scheduling-task-resource-reload-on-task-event/
last_updated: 2026-11-16T13:31:48+01:00
---

# scheduling task resource reload on-task-event

## qlik scheduling task resource reload on-task-event

Create a reload task triggered by another task

### Synopsis

Creates a reload task for the app that runs when another task finishes with
the given status.
This is a convenience wrapper over `POST /scheduling/tasks`; the full task
definition is generated server-side. Use `POST /scheduling/tasks` for advanced
configurations.

The upstream task (`onTaskId`) must belong to the caller's tenant, and the caller
needs read access to the upstream task's app. The server adds the upstream task's
`spaceId` and `appId` to the event correlations of the created task. If the
upstream task is deleted later, this task no longer runs.

Errors:

- `400` `CHO-001`: the request body or the path `id` is invalid. This includes a
  `name` or `description` over its maximum length, and an `onTaskStatus` other
  than `succeeded`, `failed` or `any`.
- `400` `CHO-016`: `onTaskId` is not a UUID, or no such task exists in the caller's tenant.
- `403` `CHO-003`: the app does not exist, is not accessible, or the caller
  lacks `app:reload` on it.
  `CHO-015`: the caller cannot read the upstream task's app.
- `422` `CHO-014`: the app already has the maximum number of tasks.
  `CHO-018`: the caller has reached the per-user task quota, when one is configured.
- `424` `CHO-013`: the task could not be stored. Nothing is created.
- `404` `CHO-004`: the upstream task was deleted while the request was processed.

```
qlik scheduling task resource reload on-task-event <resourceId> [flags]
```

### Options

```
      --description string    A human-readable description of the task's purpose.
      --enabled               Whether the task is enabled. A disabled task never runs on its own. Defaults to ˋfalseˋ.
  -f, --file file             Read request body from the specified file
  -h, --help                  help for on-task-event
      --interval int          Duration in seconds to wait between retries, at least 1 (default 1)
      --name string           (Required) The name that identifies the task.
      --onTaskId string       (Required) The unique identifier of the upstream task whose runs trigger this reload. It must belong to the caller's tenant, and the caller needs read access to its app.
      --onTaskStatus string   The outcome of an upstream task run that triggers this reload. Defaults to ˋsucceededˋ.
                              - ˋsucceededˋ: the run completed successfully. For an automation, ˋfinishedˋ
                                and ˋfinished with warningsˋ count as success.
                              - ˋfailedˋ: the run ended in any unsuccessful state, such as failed, canceled
                                or exceeded limits.
                              - ˋanyˋ: either of the above.
                              
                              Only runs started by the scheduling service count: scheduled, triggered or
                              manual task runs. A reload started directly on the app does not.
                              Allowed values: "succeeded", "failed", "any"
      --partial               Whether the reload is partial.
  -q, --quiet                 Return only IDs from the command
      --raw                   Return original response from server without any processing
      --retry int             Number of retries to do before failing, max 10
```

### Options inherited from parent commands

```
  -c, --config string            path/to/config.yml where parameters can be set instead of on the command line
      --context string           Name of the context used when connecting to Qlik Associative Engine
      --headers stringToString   HTTP headers to use when connecting to Qlik Associative Engine (default [])
      --insecure                 Allow connecting to hosts with self-signed certificates
      --json                     Returns output in JSON format, if possible. Disables verbose and traffic output
  -s, --server string            URL to Qlik Cloud or directly to a Qlik Associative Engine
      --server-type string       The type of server you are using: cloud, Windows (Enterprise on Windows) or engine
  -v, --verbose                  Log extra information
```
