Wait
Waits for a relative duration or until an absolute date and time.
@lainstack/time/wait · Flow
How to use it
Section titled “How to use it”Use this block to pause the run, then continue on out. The pause is a durable timer, so it survives restarts. For a pause that needs a person’s decision, use @lainstack/flow/approval. To calculate a date without pausing, use @lainstack/time/date-math.
modedelaywaits fordurationMs, from 1 second to 365 days.modeuntilwaits for the datetime inuntil.delayneedsdurationMs.untilneedsuntil.- A target in
untilmore than 365 days ahead fails the step. - If the
untiltime has already passed, the block does not wait. It continues at once andwasPastDueis true. untilwithout an offset is read intimezone(defaultUTC). A local time that does not exist fails. A time that exists twice usesdisambiguation,earlierby default. Anuntilvalue with an offset ignorestimezonefor the instant.- The outputs describe the target moment (
iso,epochMs,localIso,date,time,wasPastDue). They are fixed when the wait starts. - Inside
@lainstack/flow/for-each-item, each item waits on its own timer.
Settings
Section titled “Settings”| Setting | Key | Type | Details |
|---|---|---|---|
| Mode | mode |
One of Delay, Until |
Default delay. |
| Duration | durationMs |
Number | |
| Target | until |
Text | |
| Timezone (required) | timezone |
Text | |
| Fold | disambiguation |
One of Earlier, Later |
Default earlier. |
Outputs
Section titled “Outputs”| Output | Path | Type |
|---|---|---|
| ISO target | iso |
Text |
| Epoch milliseconds | epochMs |
Number |
| Resolved timezone | resolvedTimezone |
Text |
| Local target | localIso |
Text |
| Date | date |
Date |
| Time | time |
Text |
| Was past due | wasPastDue |
Yes or no |