timers

command
v1.0.0-beta2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Timers sample

Features

  • Schedules an orchestration to start in the future.
  • Uses one logical durable timer with a five-second deadline.
  • Configures a two-second maximum physical timer interval so the long timer is split into multiple history records.
  • Demonstrates replay-stable CurrentTimeUtc and NewGuid values by recording them through an activity and validating the final payload.
  • Reads orchestration history to verify the physical timer split.

Prerequisites

Start a Durable Task Scheduler endpoint or emulator and set:

export DTS_CONNECTION_STRING="Endpoint=http://localhost:8080;TaskHub=default;Authentication=None"

Run

go run ./samples/timers

Expected result

The orchestration starts at the scheduled time, waits for one five-second logical timer, and history contains three created/fired physical timer chunks ending at the single logical deadline. On success it prints:

SAMPLE_OK timers

Cleanup

The sample terminates if needed and recursively purges only its generated sample-timers-* orchestration instance before shutting down.

Noninteractive command

DTS_CONNECTION_STRING="$DTS_CONNECTION_STRING" go run ./samples/timers

Documentation

Overview

Command timers demonstrates durable timers, scheduled start, long-timer splitting, replay-stable orchestration time, and deterministic GUIDs.

export DTS_CONNECTION_STRING="Endpoint=http://localhost:8080;TaskHub=default;Authentication=None"
go run ./samples/timers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL