temporal activity
complete
Complete an Activity, marking it as successfully finished. Specify the Activity ID and include a JSON result for the returned value:
temporal activity complete \
--activity-id YourActivityId \
--workflow-id YourWorkflowId \
--result '{"YourResultKey": "YourResultVal"}'
Use the following options to change the behavior of this command.
Flags:
--activity-id string
Activity ID to complete. Required.
--identity string
Identity of the user submitting this request.
--result string
Result JSON
to return. Required.
Global Flags:
--address string
Temporal Service gRPC endpoint. (default "127.0.0.1:7233")
--api-key string
API key for request.
--codec-auth string
Authorization header for Codec Server requests.
--codec-endpoint string
Remote Codec Server endpoint.
--codec-header string[]
HTTP headers for requests to codec server. Format as a KEY=VALUE
pair. May be passed multiple times to set multiple headers.
--color string-enum
Output coloring. Accepted values: always, never, auto. (default "auto")
--command-timeout duration
The command execution timeout. 0s means no timeout.
--env string
Active environment name (ENV
). (default "default")
--env-file string
Path to environment settings file. Defaults to $HOME/.config/temporalio/temporal.yaml
.
--grpc-meta string[]
HTTP headers for requests. Format as a KEY=VALUE
pair. May be passed multiple times to set multiple headers.
--log-format string-enum
Log format. Accepted values: text, json. (default "text")
--log-level string-enum
Log level. Default is "info" for most commands and "warn" for server start-dev
. Accepted values: debug, info, warn, error, never. (default "info")
--namespace, -n string
Temporal Service Namespace. (default "default")
--no-json-shorthand-payloads bool
Raw payload output, even if the JSON option was used.
--output, -o string-enum
Non-logging data output format. Accepted values: text, json, jsonl, none. (default "text")
--time-format string-enum
Time format. Accepted values: relative, iso, raw. (default "relative")
--tls bool
Enable base TLS encryption. Does not have additional options like mTLS or client certs.
--tls-ca-data string
Data for server CA certificate. Can't be used with --tls-ca-path.
--tls-ca-path string
Path to server CA certificate. Can't be used with --tls-ca-data.
--tls-cert-data string
Data for x509 certificate. Can't be used with --tls-cert-path.
--tls-cert-path string
Path to x509 certificate. Can't be used with --tls-cert-data.
--tls-disable-host-verification bool
Disable TLS host-name verification.
--tls-key-data string
Private certificate key data. Can't be used with --tls-key-path.
--tls-key-path string
Path to x509 private key. Can't be used with --tls-key-data.
--tls-server-name string
Override target TLS server name.
fail
Fail an Activity, marking it as having encountered an error. Specify the Activity and Workflow IDs:
temporal activity fail \
--activity-id YourActivityId \
--workflow-id YourWorkflowId
Use the following options to change the behavior of this command.
Flags:
--activity-id string
Activity ID to fail. Required.
--detail string
Reason for failing the Activity (JSON).
--identity string
Identity of the user submitting this request.
--reason string
Reason for failing the Activity.
Global Flags:
--address string
Temporal Service gRPC endpoint. (default "127.0.0.1:7233")
--api-key string
API key for request.
--codec-auth string
Authorization header for Codec Server requests.
--codec-endpoint string
Remote Codec Server endpoint.
--codec-header string[]
HTTP headers for requests to codec server. Format as a KEY=VALUE
pair. May be passed multiple times to set multiple headers.
--color string-enum
Output coloring. Accepted values: always, never, auto. (default "auto")
--command-timeout duration
The command execution timeout. 0s means no timeout.
--env string
Active environment name (ENV
). (default "default")
--env-file string
Path to environment settings file. Defaults to $HOME/.config/temporalio/temporal.yaml
.
--grpc-meta string[]
HTTP headers for requests. Format as a KEY=VALUE
pair. May be passed multiple times to set multiple headers.
--log-format string-enum
Log format. Accepted values: text, json. (default "text")
--log-level string-enum
Log level. Default is "info" for most commands and "warn" for server start-dev
. Accepted values: debug, info, warn, error, never. (default "info")
--namespace, -n string
Temporal Service Namespace. (default "default")
--no-json-shorthand-payloads bool
Raw payload output, even if the JSON option was used.
--output, -o string-enum
Non-logging data output format. Accepted values: text, json, jsonl, none. (default "text")
--time-format string-enum
Time format. Accepted values: relative, iso, raw. (default "relative")
--tls bool
Enable base TLS encryption. Does not have additional options like mTLS or client certs.
--tls-ca-data string
Data for server CA certificate. Can't be used with --tls-ca-path.
--tls-ca-path string
Path to server CA certificate. Can't be used with --tls-ca-data.
--tls-cert-data string
Data for x509 certificate. Can't be used with --tls-cert-path.
--tls-cert-path string
Path to x509 certificate. Can't be used with --tls-cert-data.
--tls-disable-host-verification bool
Disable TLS host-name verification.
--tls-key-data string
Private certificate key data. Can't be used with --tls-key-path.
--tls-key-path string
Path to x509 private key. Can't be used with --tls-key-data.
--tls-server-name string
Override target TLS server name.
pause
Pause an Activity.
If the Activity is not currently running (e.g. because it previously failed), it will not be run again until it is unpaused.
However, if the Activity is currently running, it will run to completion. If the Activity is on its last retry attempt and fails, the failure will be returned to the caller, just as if the Activity had not been paused.
Activities can be specified by their Activity ID or Activity Type. One of those parameters must be provided. If both are provided - Activity Type will be used, and Activity ID will be ignored.
Specify the Activity and Workflow IDs:
temporal activity pause
--activity-id YourActivityId
--workflow-id YourWorkflowId
Use the following options to change the behavior of this command.
**Flags:**
**--activity-id**, **-a** _string_
Activity ID to pause.
**--activity-type**, **-g** _string_
Activity Type to pause.
**--identity** _string_
Identity of the user submitting this request.
**Global Flags:**
**--address** _string_
Temporal Service gRPC endpoint. (default "127.0.0.1:7233")
**--api-key** _string_
API key for request.
**--codec-auth** _string_
Authorization header for Codec Server requests.
**--codec-endpoint** _string_
Remote Codec Server endpoint.
**--codec-header** _string[]_
HTTP headers for requests to codec server. Format as a `KEY=VALUE` pair. May be passed multiple times to set multiple headers.
**--color** _string-enum_
Output coloring. Accepted values: always, never, auto. (default "auto")
**--command-timeout** _duration_
The command execution timeout. 0s means no timeout.
**--env** _string_
Active environment name (`ENV`). (default "default")
**--env-file** _string_
Path to environment settings file. Defaults to `$HOME/.config/temporalio/temporal.yaml`.
**--grpc-meta** _string[]_
HTTP headers for requests. Format as a `KEY=VALUE` pair. May be passed multiple times to set multiple headers.
**--log-format** _string-enum_
Log format. Accepted values: text, json. (default "text")
**--log-level** _string-enum_
Log level. Default is "info" for most commands and "warn" for `server start-dev`. Accepted values: debug, info, warn, error, never. (default "info")
**--namespace**, **-n** _string_
Temporal Service Namespace. (default "default")
**--no-json-shorthand-payloads** _bool_
Raw payload output, even if the JSON option was used.
**--output**, **-o** _string-enum_
Non-logging data output format. Accepted values: text, json, jsonl, none. (default "text")
**--time-format** _string-enum_
Time format. Accepted values: relative, iso, raw. (default "relative")
**--tls** _bool_
Enable base TLS encryption. Does not have additional options like mTLS or client certs.
**--tls-ca-data** _string_
Data for server CA certificate. Can't be used with --tls-ca-path.
**--tls-ca-path** _string_
Path to server CA certificate. Can't be used with --tls-ca-data.
**--tls-cert-data** _string_
Data for x509 certificate. Can't be used with --tls-cert-path.
**--tls-cert-path** _string_
Path to x509 certificate. Can't be used with --tls-cert-data.
**--tls-disable-host-verification** _bool_
Disable TLS host-name verification.
**--tls-key-data** _string_
Private certificate key data. Can't be used with --tls-key-path.
**--tls-key-path** _string_
Path to x509 private key. Can't be used with --tls-key-data.
**--tls-server-name** _string_
Override target TLS server name.
## reset
Resetting an activity resets both the number of attempts and the activity
timeout.
If activity is paused and 'keep_paused' flag is not provided - it will be
unpaused.
If activity is paused and 'keep_paused' flag is provided - it will stay
paused.
If activity is waiting for the retry, is will be rescheduled immediately.
If the 'reset_heartbeats' flag is set, the activity heartbeat timer and
heartbeats will be reset.
Activities can be specified by their Activity ID or Activity Type.
One of those parameters must be provided. If both are provided - Activity
Type will be used, and Activity ID will be ignored.
Specify the Activity Type of ID and Workflow IDs:
temporal activity reset
--activity-id YourActivityId
--workflow-id YourWorkflowId
--keep-paused
--reset-heartbeats
Use the following options to change the behavior of this command.
**Flags:**
**--activity-id**, **-a** _string_
Activity ID to pause.
**--activity-type**, **-g** _string_
Activity Type to pause.
**--identity** _string_
Identity of the user submitting this request.
**--keep-paused** _bool_
If activity was paused - it will stay paused.
**--reset-heartbeats** _bool_
Reset the Activity's heartbeat.
**Global Flags:**
**--address** _string_
Temporal Service gRPC endpoint. (default "127.0.0.1:7233")
**--api-key** _string_
API key for request.
**--codec-auth** _string_
Authorization header for Codec Server requests.
**--codec-endpoint** _string_
Remote Codec Server endpoint.
**--codec-header** _string[]_
HTTP headers for requests to codec server. Format as a `KEY=VALUE` pair. May be passed multiple times to set multiple headers.
**--color** _string-enum_
Output coloring. Accepted values: always, never, auto. (default "auto")
**--command-timeout** _duration_
The command execution timeout. 0s means no timeout.
**--env** _string_
Active environment name (`ENV`). (default "default")
**--env-file** _string_
Path to environment settings file. Defaults to `$HOME/.config/temporalio/temporal.yaml`.
**--grpc-meta** _string[]_
HTTP headers for requests. Format as a `KEY=VALUE` pair. May be passed multiple times to set multiple headers.
**--log-format** _string-enum_
Log format. Accepted values: text, json. (default "text")
**--log-level** _string-enum_
Log level. Default is "info" for most commands and "warn" for `server start-dev`. Accepted values: debug, info, warn, error, never. (default "info")
**--namespace**, **-n** _string_
Temporal Service Namespace. (default "default")
**--no-json-shorthand-payloads** _bool_
Raw payload output, even if the JSON option was used.
**--output**, **-o** _string-enum_
Non-logging data output format. Accepted values: text, json, jsonl, none. (default "text")
**--time-format** _string-enum_
Time format. Accepted values: relative, iso, raw. (default "relative")
**--tls** _bool_
Enable base TLS encryption. Does not have additional options like mTLS or client certs.
**--tls-ca-data** _string_
Data for server CA certificate. Can't be used with --tls-ca-path.
**--tls-ca-path** _string_
Path to server CA certificate. Can't be used with --tls-ca-data.
**--tls-cert-data** _string_
Data for x509 certificate. Can't be used with --tls-cert-path.
**--tls-cert-path** _string_
Path to x509 certificate. Can't be used with --tls-cert-data.
**--tls-disable-host-verification** _bool_
Disable TLS host-name verification.
**--tls-key-data** _string_
Private certificate key data. Can't be used with --tls-key-path.
**--tls-key-path** _string_
Path to x509 private key. Can't be used with --tls-key-data.
**--tls-server-name** _string_
Override target TLS server name.
## unpause
Re-schedule a previously-paused Activity for execution.
If the Activity is not running and is past its retry timeout, it will be
scheduled immediately. Otherwise, it will be scheduled after its retry
timeout expires.
Use `--reset-attempts` to reset the number of previous run attempts to
zero. For example, if an Activity is near the maximum number of attempts
N specified in its retry policy, `--reset-attempts` will allow the
Activity to be retried another N times after unpausing.
Use `--reset-heartbeat` to reset the Activity's heartbeats.
Activities can be specified by their Activity ID or Activity Type.
One of those parameters must be provided. If both are provided - Activity
Type will be used, and Activity ID will be ignored.
Activities can be unpaused in bulk via a visibility Query list filter:
temporal activity unpause
--query YourQuery
--reason YourReasonForTermination
Specify the Activity ID or Type and Workflow IDs:
temporal activity unpause
--activity-id YourActivityId
--workflow-id YourWorkflowId
--reset-attempts
--reset-heartbeats
Use the following options to change the behavior of this command.
**Flags:**
**--activity-id**, **-a** _string_
Activity ID to unpause. Can only be used without --query.
**--activity-type**, **-g** _string_
Activity Type to unpause.
**--identity** _string_
Identity of the user submitting this request.
**--jitter**, **-j** _duration_
The activity will start at random a time within the specified duration. Can only be used with --query.
**--match-all** _bool_
Every paused activity should be unpaused. This flag is ignored if activity-type is provided. Can only be used with --query.
**--query**, **-q** _string_
Content for an SQL-like `QUERY` List Filter. You must set either --workflow-id or --query.
**--reason** _string_
Reason for batch operation. Only use with --query. Defaults to user name.
**--reset-attempts** _bool_
Also reset the activity attempts.
**--reset-heartbeats** _bool_
Reset the Activity's heartbeats. Only works with --reset-attempts.
**--rps** _float_
Limit batch's requests per second. Only allowed if query is present.
**--run-id**, **-r** _string_
Run ID. Only use with --workflow-id. Cannot use with --query.
**--workflow-id**, **-w** _string_
Workflow ID. You must set either --workflow-id or --query.
**--yes**, **-y** _bool_
Don't prompt to confirm signaling. Only allowed when --query is present.
**Global Flags:**
**--address** _string_
Temporal Service gRPC endpoint. (default "127.0.0.1:7233")
**--api-key** _string_
API key for request.
**--codec-auth** _string_
Authorization header for Codec Server requests.
**--codec-endpoint** _string_
Remote Codec Server endpoint.
**--codec-header** _string[]_
HTTP headers for requests to codec server. Format as a `KEY=VALUE` pair. May be passed multiple times to set multiple headers.
**--color** _string-enum_
Output coloring. Accepted values: always, never, auto. (default "auto")
**--command-timeout** _duration_
The command execution timeout. 0s means no timeout.
**--env** _string_
Active environment name (`ENV`). (default "default")
**--env-file** _string_
Path to environment settings file. Defaults to `$HOME/.config/temporalio/temporal.yaml`.
**--grpc-meta** _string[]_
HTTP headers for requests. Format as a `KEY=VALUE` pair. May be passed multiple times to set multiple headers.
**--log-format** _string-enum_
Log format. Accepted values: text, json. (default "text")
**--log-level** _string-enum_
Log level. Default is "info" for most commands and "warn" for `server start-dev`. Accepted values: debug, info, warn, error, never. (default "info")
**--namespace**, **-n** _string_
Temporal Service Namespace. (default "default")
**--no-json-shorthand-payloads** _bool_
Raw payload output, even if the JSON option was used.
**--output**, **-o** _string-enum_
Non-logging data output format. Accepted values: text, json, jsonl, none. (default "text")
**--time-format** _string-enum_
Time format. Accepted values: relative, iso, raw. (default "relative")
**--tls** _bool_
Enable base TLS encryption. Does not have additional options like mTLS or client certs.
**--tls-ca-data** _string_
Data for server CA certificate. Can't be used with --tls-ca-path.
**--tls-ca-path** _string_
Path to server CA certificate. Can't be used with --tls-ca-data.
**--tls-cert-data** _string_
Data for x509 certificate. Can't be used with --tls-cert-path.
**--tls-cert-path** _string_
Path to x509 certificate. Can't be used with --tls-cert-data.
**--tls-disable-host-verification** _bool_
Disable TLS host-name verification.
**--tls-key-data** _string_
Private certificate key data. Can't be used with --tls-key-path.
**--tls-key-path** _string_
Path to x509 private key. Can't be used with --tls-key-data.
**--tls-server-name** _string_
Override target TLS server name.
## update-options
Update Activity options. Specify the Activity and Workflow IDs, and
options you want to update.
Updates are incremental, only changing the specified options.
temporal activity update-options
--activity-id YourActivityId
--workflow-id YourWorkflowId
--task-queue NewTaskQueueName
--schedule-to-close-timeout DURATION
--schedule-to-start-timeout DURATION
--start-to-close-timeout DURATION
--heartbeat-timeout DURATION
--retry-initial-interval DURATION
--retry-maximum-interval DURATION
--retry-backoff-coefficient NewBackoffCoefficient
--retry-maximum-attempts NewMaximumAttempts
Use the following options to change the behavior of this command.
**Flags:**
**--activity-id** _string_
Activity ID. Required.
**--heartbeat-timeout** _duration_
Maximum permitted time between successful worker heartbeats.
**--identity** _string_
Identity of the user submitting this request.
**--retry-backoff-coefficient** _float_
Coefficient used to calculate the next retry interval. The next retry interval is previous interval multiplied by the backoff coefficient. Must be 1 or larger.
**--retry-initial-interval** _duration_
Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
**--retry-maximum-attempts** _int_
Maximum number of attempts. When exceeded the retries stop even if not expired yet. Setting this value to 1 disables retries. Setting this value to 0 means unlimited attempts(up to the timeouts).
**--retry-maximum-interval** _duration_
Maximum interval between retries. Exponential backoff leads to interval increase. This value is the cap of the increase.
**--schedule-to-close-timeout** _duration_
Indicates how long the caller is willing to wait for an activity completion. Limits how long retries will be attempted.
**--schedule-to-start-timeout** _duration_
Limits time an activity task can stay in a task queue before a worker picks it up. This timeout is always non retryable, as all a retry would achieve is to put it back into the same queue. Defaults to the schedule-to-close timeout or workflow execution timeout if not specified.
**--start-to-close-timeout** _duration_
Maximum time an activity is allowed to execute after being picked up by a worker. This timeout is always retryable.
**--task-queue** _string_
Name of the task queue for the Activity.
**Global Flags:**
**--address** _string_
Temporal Service gRPC endpoint. (default "127.0.0.1:7233")
**--api-key** _string_
API key for request.
**--codec-auth** _string_
Authorization header for Codec Server requests.
**--codec-endpoint** _string_
Remote Codec Server endpoint.
**--codec-header** _string[]_
HTTP headers for requests to codec server. Format as a `KEY=VALUE` pair. May be passed multiple times to set multiple headers.
**--color** _string-enum_
Output coloring. Accepted values: always, never, auto. (default "auto")
**--command-timeout** _duration_
The command execution timeout. 0s means no timeout.
**--env** _string_
Active environment name (`ENV`). (default "default")
**--env-file** _string_
Path to environment settings file. Defaults to `$HOME/.config/temporalio/temporal.yaml`.
**--grpc-meta** _string[]_
HTTP headers for requests. Format as a `KEY=VALUE` pair. May be passed multiple times to set multiple headers.
**--log-format** _string-enum_
Log format. Accepted values: text, json. (default "text")
**--log-level** _string-enum_
Log level. Default is "info" for most commands and "warn" for `server start-dev`. Accepted values: debug, info, warn, error, never. (default "info")
**--namespace**, **-n** _string_
Temporal Service Namespace. (default "default")
**--no-json-shorthand-payloads** _bool_
Raw payload output, even if the JSON option was used.
**--output**, **-o** _string-enum_
Non-logging data output format. Accepted values: text, json, jsonl, none. (default "text")
**--time-format** _string-enum_
Time format. Accepted values: relative, iso, raw. (default "relative")
**--tls** _bool_
Enable base TLS encryption. Does not have additional options like mTLS or client certs.
**--tls-ca-data** _string_
Data for server CA certificate. Can't be used with --tls-ca-path.
**--tls-ca-path** _string_
Path to server CA certificate. Can't be used with --tls-ca-data.
**--tls-cert-data** _string_
Data for x509 certificate. Can't be used with --tls-cert-path.
**--tls-cert-path** _string_
Path to x509 certificate. Can't be used with --tls-cert-data.
**--tls-disable-host-verification** _bool_
Disable TLS host-name verification.
**--tls-key-data** _string_
Private certificate key data. Can't be used with --tls-key-path.
**--tls-key-path** _string_
Path to x509 private key. Can't be used with --tls-key-data.
**--tls-server-name** _string_
Override target TLS server name.