# Cancel Scheduled Run

> Cancel a run scheduled with Run Later, by its key.

- ID: `cancel_scheduled_run`
- Type: Block
- Category: [Logic](https://inventor.bot/docs/reference/blocks/logic.md)

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `key` | yes | The key of the run to cancel. | e.g. `"giveaway-123"` |

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `cancelled` | False when nothing was scheduled with this key. | e.g. `"true"` |

**Example**

```go
cancelScheduledRun := cancel_scheduled_run(Args{key: "giveaway-123"})
send_text_message(Args{
	channel_id:      trigger.channel_id,
	message_content: "Cancelled: " + cancelScheduledRun.cancelled,
})
```