Skip to main content

Standalone Activity

SUPPORT, STABILITY, and DEPENDENCY INFO

Standalone Activities are available as a Public Preview feature in Temporal Cloud and in the Temporal CLI v1.7.0 or higher with Temporal Server v1.31.0 or higher.

See limitations below.

What is a Standalone Activity?

If you need to orchestrate multiple Activities, use a Workflow. But if you just need to execute a single Activity, use a Standalone Activity.

Standalone Activities are Temporal’s job queue - the simplest way to run durable, retryable tasks on Temporal.

Standalone Activity vs. Workflow - Standalone Activities execute a single function reliably as a top-level primitive, while Workflows orchestrate multiple Activity stepsStandalone Activity vs. Workflow - Standalone Activities execute a single function reliably as a top-level primitive, while Workflows orchestrate multiple Activity steps

A Standalone Activity is a top-level Activity Execution started directly by a Client, without using a Workflow. This results in fewer Billable Actions in Temporal Cloud than using a Workflow to run a single Activity. If your Activity Execution is short-lived, you will also notice lower latency, since there are fewer Worker round-trips.

You write your Activity Functions the same way for both. In fact, the same Activity Function can be executed as a Standalone Activity and as a Workflow Activity with no code changes.

Use cases

Standalone Activities can be used for durable job processing use cases such as sending an email, processing a webhook, syncing data, or executing a single function reliably with built-in retries and timeouts.

Key features

  • Execute any Temporal Activity as a top-level primitive without the overhead of a Workflow
  • Native async job processing model: schedule -> dispatch -> process -> result
  • No head-of-line blocking - a slow job doesn’t block the dispatch of other Tasks
  • Arbitrary length jobs with heartbeats for liveness and checkpointing progress
  • At-least-once execution by default with native retry policy and timeouts
  • At-most-once execution if retry max attempts is 1
  • Addressable - get an Activity ID / Run ID and get the result, cancel, and terminate
  • Deduplication - with conflict policy: (USE_EXISTING, ...), reuse policy: (REJECT_DUPLICATES, ...)
  • Separate ID space from Workflows - Standalone Activities are a different kind of top-level execution
  • Priority and fairness - multi-tenant fairness, weighted priority tiers, and safeguards against starvation of lower-weighted tasks
  • Visibility - list Activity Executions and view status, retry count, and last error
  • Manual completion by ID (or token): ignore activity return and wait for external completion
  • Activity metrics - including counts for success, failure, timeout, and cancel
  • Dual use - execute Activities within a Workflow or standalone with no Worker code changes

Observability

All existing Activity metrics apply to Standalone Activities. This includes counts for scheduled, started, completed, failed, timed out, and canceled activities.

You can use List Filters to query Standalone Activity Executions by type, status, task queue, and other attributes using the SDK or the temporal activity list CLI command.

CountActivities returns the total number of Standalone Activity Executions matching a filter, analogous to counting Workflow Executions. This is the total count of executions (running, completed, failed, etc.) - not the number of queued tasks.

Public Preview limitations

The Public Preview of Standalone Activities has some known limitations:

  • Pause, reset, and update options are not supported in Public Preview but scheduled for GA.
  • TerminateExisting conflict policy / TerminateIfRunning reuse policy is not supported yet.

Temporal CLI support

Standalone Activities require Temporal CLI v1.7.0 or higher and Temporal Server v1.31.0 or higher.

Install with Homebrew:

brew install temporal

Or see the Temporal CLI install guide for other platforms.

Verify the installation:

temporal --version

Which should output v1.7.0 or higher, for example:

temporal version 1.7.0 (Server 1.31.0, UI 2.49.1)

The temporal activity subcommand supports Standalone Activities with commands including: start, execute, result, list, count, describe, cancel, and terminate.

The Temporal Dev Server has Standalone Activities enabled by default for local testing.

Temporal Cloud support

Standalone Activities in Temporal Cloud is available as a Public Preview feature.