<!--
{
  "availability" : [
    "macCatalyst: 14.0.0 -",
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Automator",
  "identifier" : "/documentation/Automator/AMAction/willFinishRunning()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Automator"
    ],
    "preciseIdentifier" : "c:objc(cs)AMAction(im)willFinishRunning"
  },
  "title" : "willFinishRunning()"
}
-->

# willFinishRunning()

Provides an opportunity for an action to perform cleanup operations, such as closing windows and deallocating memory.

```
func willFinishRunning()
```

## Discussion

Overridde this method in actions that need to make asynchronous calls. Automator invokes this method when the action is about to complete its run phase.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)