durable-timers
Expert knowledge on durable timer patterns for recurring tasks, polling, and scheduled actions.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Expert knowledge on durable timer patterns for recurring tasks, polling, and scheduled actions.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
The order of operations for changing a live agent safely — diagnose, patch, publish, converge, verify, roll back. Use whenever you are about to modify an agent package that something is already running on.
Deploy PilotSwarm to AKS using the repo's canonical scripts and checks. Use when refreshing secrets, building/pushing the worker image, rolling out to AKS, or verifying provider/model changes in the live cluster.
Reset remote PilotSwarm state for AKS safely. Use when wiping the PilotSwarm database/blob state, clearing stale orchestration history, or recovering from namespace drift and replay/nondeterminism issues.
Use when bringing up a fresh, isolated PilotSwarm environment (`mysandbox`, `myenv2`, etc.) via the npm Bicep/GitOps orchestrator at `deploy/scripts/deploy.mjs`. Covers `new-env` scaffolding, EDGE_MODE × TLS_SOURCE selection, the `all` aggregate, per-service redeploys with `--steps`, force-redeploy semantics, verification, and teardown. Strictly separate from the legacy bash path operated by `scripts/deploy-aks.sh`.
Use after deploying a PilotSwarm stamp with VPN_GATEWAY_ENABLED=true when an operator needs the Azure VPN client profile (azurevpnconfig.xml). Wraps deploy/scripts/auth/Get-VpnClientProfile.ps1 — downloads the gateway-issued profile zip via 'az network vnet-gateway vpn-client generate' and extracts it under the gitignored deploy/envs/local/<env>/vpn-client/ folder. The XML is the same for every user (no per-user credentials), and end users still authenticate with their own Entra ID at connect time.
How to compute model latency and estimated $ cost from PilotSwarm observability data. Read this before reporting that a model is "slow" or "expensive" — most apparent slowness is orchestration overhead, not model inference, and most cost numbers are guesses unless they reference a real published price card.
| name | durable-timers |
| description | Expert knowledge on durable timer patterns for recurring tasks, polling, and scheduled actions. |
You are running in a durable execution environment with wait, cron, and cron_at tools that survive process restarts and node migrations.
1. cron(interval_seconds, reason="...")
2. Do work
3. Finish the turn normally
4. The orchestration wakes you again on the next interval
5. On each wake-up, perform the scheduled work before responding
1. cron_at(minute=M, hour=H, tz="Area/City", reason="...")
2. Finish the turn normally
3. The orchestration wakes you at the next matching calendar instant
4. On each wake-up, perform the scheduled work described by the reason before responding
Use cron_at for named calendar times such as daily at 02:00 UTC, hourly at HH:05, Mondays at 09:00 America/New_York, or monthly on day 1 at 04:00. Use max_fires: 1 for a one-shot scheduled-at-time action.
loop:
1. Check condition
2. If met → done
3. wait(backoff_seconds) // increase each iteration
4. goto loop
1. wait(delay_seconds)
2. Do the scheduled work
cron for recurring or periodic workcron_at for wall-clock schedules; do not wake every N minutes just to check the current timewait for one-shot delays, polling backoff, or short pauses inside a turnsetTimeout, sleep, or other external timing mechanismstzwait(..., preserveWorkerAffinity: true)preserveWorkerAffinity: true is best-effort affinity preservation, not a hard same-node guarantee