*** id: 2fbe3ab6-1f78-4593-8da1-4b010416d691 title: once slug: /node/reference/task/client/once description: once method for the Client class. max-toc-depth: 3 ---------------- ### once * **once**(`event`, `fn`) Attaches an event handler to the specified event. The handler will fire only once. #### Parameters | Name | Type | Description | | :------ | :------- | :----------------------------------------------------------------------------------------------------------------------- | | `event` | `string` | Name of the event. See [Events](/docs/server-sdk/v3/node/reference/task/client/events) for the list of available events. | | `fn` | Function | An event handler. |