Pcornel
Automation · Automation Design

Timeouts

Cheat sheet · https://pcornel.dk/topic.php?topic=5205

Back to the Topic

Answer

Timeouts stop a step that runs too long, such as waiting for a device or API, so the job fails cleanly instead of hanging forever. Set them per step from realistic durations.

Remember

  • Every step that waits on something needs a timeout.
  • Base timeouts on measured normal durations.
  • On timeout, fail clearly and clean up.

First checks

  • timeout 60 <command> — shell timeout
  • Per-step and overall timeouts — configuration
  • Timeout handling (cleanup) — safety

Verify in this order

step → time limit → abort/cleanup on expiry

Where it usually breaks

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5205

Confirmation

Confirm action

Continue?