Skip to main content

Timers & Scheduling

note

Replace the placeholder prompt below with the version your team has validated. Add example output, tips, and any org-specific context (namespace, SDK language, coding standards).

Prompt

Add timer and scheduling logic to the following Temporal workflow in [Python/Go/TypeScript/Java].

[Reference the workflow class to update, or describe the scheduling requirement, e.g., src/workflows/order_workflow.py — OrderWorkflow]

Requirements:
[Choose what applies:]
- Add a durable sleep of [duration] between steps
- Implement a deadline: if step X hasn't completed within [duration], take fallback action
- Send a reminder notification if the workflow hasn't progressed after [duration]
- Schedule this workflow to run on a cron schedule: [cron expression]

Use Temporal's workflow.sleep / workflow.timer (not time.sleep or OS timers) to ensure durability.

Example output

Add an example of what good output looks like for your team's use cases.

Using the Temporal Developer Skill

Activate the Temporal Developer Skill in your AI coding assistant before running this prompt. With the skill active, your assistant will automatically use workflow.sleep and Temporal's native timer APIs rather than language-native sleep functions, and will understand the determinism implications of timer usage without needing to be reminded.

Tips

  • Never use language-native sleep functions inside workflows — they break determinism.
  • For cron workflows, clarify whether missed runs should backfill or skip.