Browse the docs

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 #

Focus for an hour
Do
  1. Show a notification “Focus on for an hour”
  2. Later, after 1 hour (key focus):
  3. Show a notification “Focus is over”
Open in Switchboard to try it
Pomodoro: one macro that asks to go again
Do
  1. Show “25:00, go”
  2. Later, after 25 minutes (key pomodoro):
  3. Show a notification “Break time”
  4. Run this macro at 5m (key pomodoro)
Open in Switchboard to try it

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 #

ParameterTypeRequiredValuesWhat it does
afterany valueHow long from now: 10m, 1h, 1h30m, or seconds.
atany valueOr a time.
ifExistsone ofreplace keep addreplace (the default with a key), keep or add.
ifLateone ofrun skip askrun, skip or ask.
intotextA variable that receives the pending id.
keytextA name for the waiting block, kept per macro.
lateGraceany valueHow late it may start and still simply run. Default 5m.
stepslist of stepsThe steps to run later.
wakeyes / noKeep the Mac awake for it during its last 10 minutes.
warnany valueHow 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