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 #
- If shared.nudgeDone is “yes”
- Cancel the scheduled run “nudge”
- Else
- Run “Nudge me” at in 20m (key nudge)
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 #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
id | text | Or the pending run's id. | ||
into | text | A variable that receives the count. | ||
key | text | The key the run was scheduled with. | ||
macro | text | The 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;
cancelledis 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