---
title: "Wait, Log and Fail the run steps"
description: "Pause a run for minutes, hours or days, write your own notes into the run history, and end a run as failed when a check does not hold."
canonical: "https://docs.workflow-suite.app/wait-log-and-fail"
---

# Wait, Log and Fail the run

Three small steps that change nothing in your store, and make workflows easier to build and to follow.

## Wait

**Wait** pauses the run for minutes, hours or days, then continues with the steps below.

1. Add the step **Wait**.
2. Enter **Wait for** and choose the **Unit**: Minutes, Hours or Days. A wait can be 90 days at most.

While it waits, the run is listed as **Waiting** in the run history. Waiting runs are picked up once a minute, so a run continues up to a minute after its time.

What to know:

- The run keeps the workflow as it was when the run started, even if you edit the workflow in the meantime.
- The data of the run is kept too: steps after the wait read the event and the earlier results as before. They do not see what changed in your store meanwhile. After a long wait, look the resource up again with a Shopify query before you act on it. The template **Remind the team about unpaid orders** waits, reads the order again, and only then decides.
- A waiting run is one run. The wait does not cost extra.
- A Wait cannot be placed inside a Repeat for each.
- In a Test and in the debugger a Wait does not wait.
- If you delete a workflow, its waiting runs are not continued.

## Log

**Log** writes a message with the values you choose into the run history. It changes nothing.

1. Add the step **Log**.
2. Write the **Message**. Variables and Liquid work as in every field.

```liquid
Checked order {{ event.payload.name }}: payment is {{ steps.lookup.output.order.displayFinancialStatus }}
```

To log a whole object, add the `json` filter. A message that is one JSON object or list is shown as structured data in the run history:

```liquid
{{ steps.request.output.body | json }}
```

Good places for a Log: at the end of a loop to sum up what happened, on the Otherwise branch of a condition to note why nothing was done, and wherever you would otherwise wonder later what a value was.

Keep personal data out of log messages where you can. They are stored with the run like every other step result.

## Fail the run

**Fail the run** ends the run as Failed with a message you write, for example when a check does not hold.

1. Put a **Condition** where the check belongs.
2. On the branch that means trouble, add **Fail the run**.
3. Write the **Message**:

```liquid
No variant has the SKU {{ event.payload.body.sku }}
```

The run ends there. The message appears in the run history and in the failure alert, so the people who get the alert know what to do. The other branch carries on as normal.

- Steps after a Fail the run step never run. The editor lists that as a problem.
- Inside a Repeat for each that is set to **Go on with the next item**, the step fails only the current item.
- A failed run counts like any other run.

## Related

- [Alerts by email and text message](https://docs.workflow-suite.app/alerts.md)
- [Run history and troubleshooting](https://docs.workflow-suite.app/run-history-and-troubleshooting.md)
- [Manual runs and workflows started by another workflow](https://docs.workflow-suite.app/manual-runs-and-started-by-another-workflow.md) - start another workflow later instead of waiting.
