# DurableTaskSchedulerResource

- Module: [Aspire.Hosting.Azure.Functions](/reference/api/go/aspire.hosting.azure.functions.md)
- Version: `17.0.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

## Definition

```go
type DurableTaskSchedulerResource interface {
    ExpressionValue
    Resource
    ResourceWithConnectionString
    ResourceWithEndpoints
}
```

## Embeds

- `ExpressionValue`
- `Resource`
- `ResourceWithConnectionString`
- `ResourceWithEndpoints`

## Methods

- [AddTaskHub](/reference/api/go/aspire.hosting.azure.functions/durabletaskschedulerresource/addtaskhub.md) -- `method` -- Adds a Durable Task hub resource associated with the specified scheduler.
  ```go
  AddTaskHub(name string) DurableTaskHubResource
  ```
- [RunAsEmulator](/reference/api/go/aspire.hosting.azure.functions/durabletaskschedulerresource/runasemulator.md) -- `method` -- Configures the Durable Task scheduler to run using the local emulator (only in non-publish modes).
  ```go
  RunAsEmulator(options ...*RunAsEmulatorOptions) DurableTaskSchedulerResource
  ```
- [RunAsExisting](/reference/api/go/aspire.hosting.azure.functions/durabletaskschedulerresource/runasexisting.md) -- `method` -- Configures the Durable Task scheduler to use an existing scheduler instance from a connection string or parameter resource.
  ```go
  RunAsExisting(connectionString any) DurableTaskSchedulerResource
  ```
