{"id":15109650,"url":"https://github.com/hangfireio/hangfire","last_synced_at":"2025-05-12T20:49:06.106Z","repository":{"id":9911427,"uuid":"11920542","full_name":"HangfireIO/Hangfire","owner":"HangfireIO","description":"An easy way to perform background job processing in .NET and .NET Core applications. No Windows Service or separate process required","archived":false,"fork":false,"pushed_at":"2025-04-09T09:45:22.000Z","size":38332,"stargazers_count":9656,"open_issues_count":924,"forks_count":1717,"subscribers_count":308,"default_branch":"main","last_synced_at":"2025-04-23T17:50:35.001Z","etag":null,"topics":["background-jobs","background-thread","background-worker","dotnet","dotnet-core","hangfire","scheduled-jobs"],"latest_commit_sha":null,"homepage":"https://www.hangfire.io","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HangfireIO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-08-06T09:43:04.000Z","updated_at":"2025-04-22T16:20:21.000Z","dependencies_parsed_at":"2024-02-12T08:21:12.505Z","dependency_job_id":"ccab3009-4500-4e14-be2d-447bea7ede52","html_url":"https://github.com/HangfireIO/Hangfire","commit_stats":null,"previous_names":[],"tags_count":163,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HangfireIO%2FHangfire","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HangfireIO%2FHangfire/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HangfireIO%2FHangfire/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HangfireIO%2FHangfire/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HangfireIO","download_url":"https://codeload.github.com/HangfireIO/Hangfire/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253820167,"owners_count":21969483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["background-jobs","background-thread","background-worker","dotnet","dotnet-core","hangfire","scheduled-jobs"],"created_at":"2024-09-25T23:06:44.865Z","updated_at":"2025-05-12T20:49:06.084Z","avatar_url":"https://github.com/HangfireIO.png","language":"C#","readme":"Hangfire \n=========\n\n[![Official Site](https://img.shields.io/badge/site-hangfire.io-blue.svg)](https://www.hangfire.io) [![Latest version](https://img.shields.io/nuget/v/Hangfire.svg?label=release)](https://www.nuget.org/packages?q=hangfire) [![Downloads](https://img.shields.io/nuget/dt/Hangfire.Core.svg)](https://www.nuget.org/packages/Hangfire.Core/) [![License LGPLv3](https://img.shields.io/badge/license-LGPLv3-green.svg)](https://www.gnu.org/licenses/lgpl-3.0.html) [![Coverity Scan](https://scan.coverity.com/projects/4423/badge.svg?flat=1)](https://scan.coverity.com/projects/hangfireio-hangfire)\n\n## Build Status\n\n\u0026nbsp; | `main` | `dev`\n--- | --- | --- \n**AppVeyor** | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/70m632jkycqpnsp9/branch/main?svg=true)](https://ci.appveyor.com/project/HangfireIO/hangfire-525)  | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/70m632jkycqpnsp9/branch/dev?svg=true)](https://ci.appveyor.com/project/HangfireIO/hangfire-525) \n\n## Overview\n\nIncredibly easy way to perform **fire-and-forget**, **delayed** and **recurring jobs** in **.NET applications**. CPU and I/O intensive, long-running and short-running jobs are supported. No Windows Service / Task Scheduler required. Backed by Redis, SQL Server, SQL Azure and MSMQ.\n\nHangfire provides a unified programming model to handle background tasks in a **reliable way** and run them on shared hosting, dedicated hosting or in cloud. You can start with a simple setup and grow computational power for background jobs with time for these scenarios:\n\n- mass notifications/newsletters\n- batch import from xml, csv or json\n- creation of archives\n- firing off web hooks\n- deleting users\n- building different graphs\n- image/video processing\n- purging temporary files\n- recurring automated reports\n- database maintenance\n- *…and so on*\n\nHangfire is a .NET alternative to [Resque](https://github.com/resque/resque), [Sidekiq](https://sidekiq.org), [delayed_job](https://github.com/collectiveidea/delayed_job), [Celery](https://www.celeryproject.org).\n\n![Hangfire Dashboard](https://www.hangfire.io/img/ui/dashboard-sm.png)\n\nInstallation\n-------------\n\nHangfire is available as a NuGet package. You can install it using the NuGet Package Console window:\n\n```\nPM\u003e Install-Package Hangfire\n```\n\nAfter installation, update your existing [OWIN Startup](https://www.asp.net/aspnet/overview/owin-and-katana/owin-startup-class-detection) file with the following lines of code. If you do not have this class in your project or don't know what is it, please read the [Quick start](https://docs.hangfire.io/en/latest/getting-started/index.html) guide to learn about how to install Hangfire.\n\n```csharp\npublic void Configuration(IAppBuilder app)\n{\n    GlobalConfiguration.Configuration.UseSqlServerStorage(\"\u003cconnection string or its name\u003e\");\n    \n    app.UseHangfireServer();\n    app.UseHangfireDashboard();\n}\n```\n\nUsage\n------\n\nThis is an incomplete list of features; to see all of them, check the [official site](https://www.hangfire.io) and the [documentation](https://docs.hangfire.io).\n\n[**Fire-and-forget tasks**](https://docs.hangfire.io/en/latest/background-methods/calling-methods-in-background.html)\n\nDedicated worker pool threads execute queued background jobs as soon as possible, shortening your request's processing time.\n\n```csharp\nBackgroundJob.Enqueue(() =\u003e Console.WriteLine(\"Simple!\"));\n```\n\n[**Delayed tasks**](https://docs.hangfire.io/en/latest/background-methods/calling-methods-with-delay.html)\n\nScheduled background jobs are executed only after a given amount of time.\n\n```csharp\nBackgroundJob.Schedule(() =\u003e Console.WriteLine(\"Reliable!\"), TimeSpan.FromDays(7));\n```\n\n[**Recurring tasks**](https://docs.hangfire.io/en/latest/background-methods/performing-recurrent-tasks.html)\n\nRecurring jobs have never been simpler; just call the following method to perform any kind of recurring task using the [CRON expressions](https://en.wikipedia.org/wiki/Cron#CRON_expression).\n\n```csharp\nRecurringJob.AddOrUpdate(() =\u003e Console.WriteLine(\"Transparent!\"), Cron.Daily);\n```\n\n**Continuations**\n\nContinuations allow you to define complex workflows by chaining multiple background jobs together.\n\n```csharp\nvar id = BackgroundJob.Enqueue(() =\u003e Console.WriteLine(\"Hello, \"));\nBackgroundJob.ContinueWith(id, () =\u003e Console.WriteLine(\"world!\"));\n```\n\n**Process background tasks inside a web application…**\n\nYou can process background tasks in any OWIN-compatible application framework, including [ASP.NET MVC](https://www.asp.net/mvc), [ASP.NET Web API](https://www.asp.net/web-api), [FubuMvc](https://fubu-project.org), [Nancy](https://nancyfx.org), etc. Forget about [AppDomain unloads, Web Garden \u0026 Web Farm issues](https://haacked.com/archive/2011/10/16/the-dangers-of-implementing-recurring-background-tasks-in-asp-net.aspx/) – Hangfire is reliable for web applications from scratch, even on shared hosting.\n\n```csharp\napp.UseHangfireServer();\n```\n\n**… or anywhere else**\n\nIn console applications, Windows Service, Azure Worker Role, etc.\n\n```csharp\nusing (new BackgroundJobServer())\n{\n    Console.WriteLine(\"Hangfire Server started. Press ENTER to exit...\");\n    Console.ReadLine();\n}\n```\n\nQuestions? Problems?\n---------------------\n\nOpen-source projects develop more smoothly when discussions are public.\n\nIf you have any questions, problems related to Hangfire usage or if you want to discuss new features, please visit the [discussion forum](https://discuss.hangfire.io). You can sign in there using your existing Google or GitHub account, so it's very simple to start using it.\n\nIf you've discovered a bug, please report it to the [Hangfire GitHub Issues](https://github.com/HangfireIO/Hangfire/issues?state=open). Detailed reports with stack traces, actual and expected behaviours are welcome.\n\nRelated Projects\n-----------------\n\nPlease see the [Extensions](https://www.hangfire.io/extensions.html) page on the official site.\n\nBuilding the sources\n---------------------\n\nPrerequisites:\n* [Razor Generator](https://marketplace.visualstudio.com/items?itemName=DavidEbbo.RazorGenerator): Required if you intend to edit the cshtml files.\n* Install the MSMQ service (Microsoft Message Queue Server), if not already installed.\n\nThen, create an environment variable with Variable name `Hangfire_SqlServer_ConnectionStringTemplate` and put your connection string in the Variable value field. Example:\n\n* Variable name: `Hangfire_SqlServer_ConnectionStringTemplate`\n* Variable value: `Data Source=.\\sqlexpress;Initial Catalog=Hangfire.SqlServer.Tests;Integrated Security=True;`\n\nTo build a solution and get assembly files, just run the following command. All build artifacts, including `*.pdb` files, will be placed into the `build` folder. **Before proposing a pull request, please use this command to ensure everything is ok.** Btw, you can execute this command from the Package Manager Console window.\n\n```\nbuild\n```\n\nTo build NuGet packages as well as an archive file, use the `pack` command as shown below. You can find the result files in the `build` folder.\n\n```\nbuild pack\n```\n\nTo see the full list of available commands, pass the `-docs` switch:\n\n```\nbuild -docs\n```\n\nHangfire uses [psake](https://github.com/psake/psake) build automation tool. All psake tasks and functions defined in `psake-build.ps1` (for this project) and `psake-common.ps1` (for other Hangfire projects) files. Thanks to the psake project, they are very simple to use and modify!\n\nRazor templates are compiled upon save with the [Razor Generator Visual Studio extension](https://marketplace.visualstudio.com/items?itemName=DavidEbbo.RazorGenerator).  You will need this installed if you want to modify the Dashboard UI.\n\nReporting security issues \n--------------------------\n\nIn order to give the community time to respond and upgrade we strongly urge you report all security issues privately. Please email us at [security@hangfire.io](mailto:security@hangfire.io) with details and we will respond ASAP. Security issues always take precedence over bug fixes and feature work. We can and do mark releases as \"urgent\" if they contain serious security fixes. \n\nLicense\n--------\n\nCopyright © 2013-2025 Hangfire OÜ.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with this program.  If not, see [https://www.gnu.org/licenses/](https://www.gnu.org/licenses).\n\nLegal\n------\n\nBy submitting a Pull Request, you disavow any rights or claims to any changes submitted to the Hangfire project and assign the copyright of those changes to Hangfire OÜ.\n\nIf you cannot or do not want to reassign those rights (your employment contract for your employer may not allow this), you should not submit a PR. Open an issue and someone else can do the work.\n\nThis is a legal way of saying \"If you submit a PR to us, that code becomes ours\". 99.9% of the time that's what you intend anyways; we hope it doesn't scare you away from contributing.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhangfireio%2Fhangfire","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhangfireio%2Fhangfire","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhangfireio%2Fhangfire/lists"}