# When an Operation Can Be Canceled

> Which operations you can cancel, why an installation that has started can't be stopped, and what happens when an endpoint goes offline during an installation.

Source: https://docs.capaone.com/capaone/windows-management/when-an-operation-can-be-canceled/  
Product: CapaOne — a separate CapaSystems product; do not apply this page to any other.

You can cancel an operation on the **In Progress** tab only until CapaOne sends it to the endpoint.
After that, the CapaOne Agent has the command, and the operation runs to the end.

## Operations you can cancel

You can cancel an operation while its status is **Queued**, or **Paused** in pause mode. CapaOne
removes it from the queue, and the application or driver goes back to the state it had before. See
[Cancel operations](/capaone/windows-management/operations-in-progress/#cancel-operations).

## Operations that have started

When the status is **Sending**, **Initializing**, **Searching**, **Downloading**, **Unpacking**,
**Installing**, or **Uninstalling**, the agent has already received the operation. **Cancel
Operation** doesn't stop it.

The operation finishes and reports its result as usual. To undo the result, wait until the
operation has finished, and then uninstall or redeploy the application. See
[Assign and Redeploy Windows Applications](/capaone/application-manager/assign-and-redeploy-windows-applications/#redeploy-or-uninstall-an-application).

## When an endpoint goes offline during an operation

An endpoint can go offline during an operation, for example when it loses its network connection or
the user shuts it down.

- The operation stays on the **In Progress** tab with the last status it had. **Agent Status**
  shows **Offline**.
- The operation doesn't hold up other endpoints. CapaOne detects that the endpoint is offline,
  usually within a few minutes, and continues with operations on other endpoints.
- Operations for the endpoint that haven't been sent yet stay **Queued** until it's online again.

## When the endpoint is back online

The agent doesn't stop an operation because the network connection is lost. When the endpoint is
back online, the agent reports the result, and the status is updated. CapaOne doesn't send the
operation again.

If the computer was shut down or restarted during the operation, the operation was interrupted. It's
reported as failed, and CapaOne doesn't retry it automatically. Redeploy the application to try
again.

## When an operation is stuck

An operation can stay in a started status, such as **Installing**, much longer than expected. It
then blocks the operations queued after it on the same endpoint, and **Cancel Operation** has no
effect. This usually means the CapaOne Agent on the endpoint stopped responding while it ran the
operation.

CapaOne checks the health of agents at regular intervals and restarts agents that don't respond.
The check doesn't run all the time, so a stuck operation can stay until the next check.

To clear it now, send **Restart agent** to the endpoint. See
[Send Requests to a Windows Endpoint](/capaone/windows-management/send-requests-to-a-windows-endpoint/).
The stuck operation is cleared, and the next queued operations on the endpoint start.

## Related

- [Operations in Progress](/capaone/windows-management/operations-in-progress/)
- [Assign and Redeploy Windows Applications](/capaone/application-manager/assign-and-redeploy-windows-applications/)
