Later
A block whose steps run later, after a wait or at a time, as their own run of this macro, while the run carries on past it. "Do Not Disturb on, Later 1h: off."
Later, after after:
Examples #
- Show a notification “Focus on for an hour”
- Later, after 1 hour (key focus):
- Show a notification “Focus is over”
- Show “25:00, go”
- Later, after 25 minutes (key pomodoro):
- Show a notification “Break time”
- Run this macro at 5m (key pomodoro)
Details #
Most "later" is "for a while": mute Slack for an hour, keep the Mac awake until 5, turn Focus on and off again after a meeting's length. Put the steps that undo it in a Later block, and the macro is one action instead of two.
When the run reaches the block, Switchboard parks the block's steps and carries on with the steps after it, so the macro finishes now. At the time, the parked steps run as their own run of this macro, titled "<Macro> · Later" in Activity. The macro's Only if isn't checked again: it held when the block was reached.
The block takes a wait in after (10m, 1h, 1h30m) or a time in at (17:00, tonight 9, tomorrow 9, fri 5pm, read the way Run a macro later reads times).
The parked steps are a snapshot. Editing the macro afterwards doesn't change a block that is already waiting. They also carry the variables they use, as they were when the block was reached, and only those: a variable the steps don't mention isn't kept. Shared variables (shared.*) are read fresh when the block runs.
It waits like any scheduled run: it shows in Activity under Waiting with Run now and Cancel, survives a restart, runs at most once, and follows the late rules if the Mac was asleep at the time (see Run a macro later). The step leaves pendingId.
Keys #
Give the block a key and running the macro again replaces the waiting block instead of adding a second one, so "Focus for an hour" pressed twice ends an hour after the second press. Cancel a scheduled run with the key cancels it, and scheduled("key") reads it.
In the run it starts #
{{trigger.scheduledFor}}, {{trigger.lateBy}}, {{trigger.source}} and {{trigger.key}} say when it was due, how late it started, which macro parked it and its key.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
after | any value | How long from now: 10m, 1h, 1h30m, or seconds. | ||
at | any value | Or a time. | ||
ifExists | one of | replace keep add | replace (the default with a key), keep or add. | |
ifLate | one of | run skip ask | run, skip or ask. | |
into | text | A variable that receives the pending id. | ||
key | text | A name for the waiting block, kept per macro. | ||
lateGrace | any value | How late it may start and still simply run. Default 5m. | ||
steps | list of steps | The steps to run later. | ||
wake | yes / no | Keep the Mac awake for it during its last 10 minutes. | ||
warn | any value | How long before the time to show a heads-up. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Gotchas #
Dry run. Nothing is parked; the step says which variables it would carry.
An empty block parks nothing, and Lint says so.
Steps after the block run now, not later. Put everything that should wait inside it.
See also #
Run a macro later, Cancel a scheduled run, scheduled(), Triggers that watch: becomes true, States, waiting runs