> For the complete documentation index, see [llms.txt](https://docs.zongsoft.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zongsoft.com/documentation/en/framework/externals/projects/hangfire.md).

# Hangfire (hangfire)

The Hangfire project's capability scope, deployment products, integration entrance and usage boundaries.

Connect persistent background jobs with framework scheduling contracts, suitable for delayed execution and periodic tasks. Job storage, execution process, and management interface respectively assume different responsibilities.

| Item                  | value                                                                                         |
| --------------------- | --------------------------------------------------------------------------------------------- |
| source code directory | `externals/hangfire`                                                                          |
| main bag              | `Zongsoft.Externals.Hangfire`                                                                 |
| Companion theme       | [Task Scheduling and Resilient Execution](/documentation/en/framework/externals/execution.md) |

## Deployment and Usage Portal

Append the main package to the existing host's [Deployment checklist](/documentation/en/references/deploy-files.md), and retain the plugin list, assembly and ancillary running resources in the package:

{% code title="Application.deploy (append fragment)" %}

```ini
[plugins zongsoft externals hangfire]
nuget:Zongsoft.Externals.Hangfire
```

{% endcode %}

The business handler is mounted to `/Workbench/Scheduler/Handlers`. The delay or periodic scheduler is provided by the container, and the daemon plugin variant is responsible for the background server.

Optional products include `Zongsoft.Externals.Hangfire.Storages.Redis` and `Zongsoft.Externals.Hangfire.Web`. Redis job storage uses Hangfire connection; Web Dashboard is not responsible for performing tasks on behalf of the background server.

## Integration Steps

1. Prepare the job store and verify the daemon variants required to deploy the site.
2. Register a stable handler name, schedule a short job according to the topic example, and observe the actual execution.
3. Re-validation cycle time zone, repeated execution, failure retry and shutdown recovery.

For specific configuration, calling examples and related basic concepts, see [Task Scheduling and Resilient Execution](/documentation/en/framework/externals/execution.md).

## Project Boundaries

{% hint style="info" %}
💡 Scheduling returns task identifiers, not business results. Persistent task parameters should use serializable business data; when changing handler names or parameter structures, old tasks in storage need to be taken into account.
{% endhint %}

## Further Reading

[Browse extensions by project](/documentation/en/framework/externals/projects.md) · [Task Scheduling and Resilient Execution](/documentation/en/framework/externals/execution.md) · [source code and project description](https://github.com/Zongsoft/framework/tree/main/externals/hangfire)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zongsoft.com/documentation/en/framework/externals/projects/hangfire.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
