Browse the docs

Cancel a scheduled run

Cancels the waiting run scheduled with a key (by this macro, or another one), or the one with an id. Cancelling nothing is fine.

Cancel the scheduled run key

Examples #

Remind me in 20 minutes, unless I say I'm done
Do
  1. If shared.nudgeDone is “yes”
  2. Cancel the scheduled run “nudge”
  3. Else
  4. Run “Nudge me” at in 20m (key nudge)
Open in Switchboard to try it

Details #

A run you park with Run a macro later or a Later block can carry a key. This step cancels the waiting run with that key and leaves cancelled, the number it cancelled (0, 1, or more if some were scheduled with If one is waiting: add).

A key belongs to the macro that scheduled it, so key alone cancels this macro's run. To cancel one another macro scheduled, name that macro in macro. Instead of a key you can give the pending run's id, which schedule.run leaves in pendingId.

Cancelling a run that already ran, or a key nothing waits under, is not a failure: cancelled is 0.

Parameters #

ParameterTypeRequiredValuesWhat it does
idtextOr the pending run's id.
intotextA variable that receives the count.
keytextThe key the run was scheduled with.
macrotextThe macro that scheduled it, when it wasn't this one.

Every step also accepts label, onFailure, timeout and dryRunSafe.

Gotchas #

  • Dry run. Nothing is cancelled; cancelled is 0.

  • A cancelled run shows in Activity as cancelled, with the step as the reason.

See also #

Run a macro later, Later, scheduled(), Triggers that watch: becomes true, States, waiting runs