To simply run a command on a schedule, prefer the built-in
cron block. Each run is a one-off job, so there’s no persistent worker to keep running. Reach for Temporal’s own schedule support when you need complex or long-running scheduled workflows (durable, multi-step, with retries), or when you already run a Temporal worker.Configuration
Define atemporal block and reference it from services:
specific.hcl
Reference attributes
| Attribute | Description | Dev value | Production value |
|---|---|---|---|
temporal.<name>.url | gRPC address of the Temporal server | localhost:<port> | Temporal Cloud gRPC address |
temporal.<name>.namespace | Temporal namespace | default | Managed namespace ID |
temporal.<name>.api_key | API key for authentication | "" (empty, no auth in dev) | Auto-generated API key |
env blocks, both standalone and inside interpolated strings.
Local development
Runningspecific dev automatically:
- Downloads the Temporal CLI (first run only).
- Starts a Temporal dev server with persistent storage.
- Makes the Temporal Web UI available in the local dashboard sidebar under Workflows.
.specific/keys/<key>/data/.
The api_key attribute is an empty string in dev since the Temporal dev server doesn’t require authentication. This is safe: Temporal SDKs apply authentication only when a non-empty key is provided.
Production
Runningspecific deploy automatically provisions a managed Temporal Cloud namespace for each temporal block, with no manual setup:
- A dedicated Temporal Cloud namespace is created.
- A service account with write access is provisioned.
- An API key is generated for authentication.
- Credentials are securely injected into your services.