{"id":22346052,"url":"https://github.com/benjaminabt/hangfire.consolehost","last_synced_at":"2025-07-30T03:32:31.529Z","repository":{"id":130534896,"uuid":"160948146","full_name":"BenjaminAbt/Hangfire.ConsoleHost","owner":"BenjaminAbt","description":"Extension to run Hangfire with Dependency Injection in a .NET Core Host","archived":false,"fork":false,"pushed_at":"2018-12-17T19:11:50.000Z","size":26,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-08T10:39:45.216Z","etag":null,"topics":["hangfire"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BenjaminAbt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-12-08T14:41:45.000Z","updated_at":"2022-10-03T07:12:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"bd151a4c-3d46-4c78-95c1-717c0cae0bf6","html_url":"https://github.com/BenjaminAbt/Hangfire.ConsoleHost","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BenjaminAbt/Hangfire.ConsoleHost","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenjaminAbt%2FHangfire.ConsoleHost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenjaminAbt%2FHangfire.ConsoleHost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenjaminAbt%2FHangfire.ConsoleHost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenjaminAbt%2FHangfire.ConsoleHost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BenjaminAbt","download_url":"https://codeload.github.com/BenjaminAbt/Hangfire.ConsoleHost/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenjaminAbt%2FHangfire.ConsoleHost/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267803984,"owners_count":24146527,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["hangfire"],"created_at":"2024-12-04T09:19:44.373Z","updated_at":"2025-07-30T03:32:31.519Z","avatar_url":"https://github.com/BenjaminAbt.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hangfire.ConsoleHost\n\n[![Build Status](https://benjaminabt.visualstudio.com/BenjaminAbt.Hangfire.ConsoleHost/_apis/build/status/BenjaminAbt.Hangfire.ConsoleHost-CI)](https://benjaminabt.visualstudio.com/BenjaminAbt.Hangfire.ConsoleHost/_build/latest?definitionId=12) ![Nuget](https://img.shields.io/nuget/v/Hangfire.ConsoleHost.svg)\n\n## Overview\n\nRun Hangfire with Microsoft.Extensions.DependencyInjection in your .NET Core Console.\n\n## Install\n\n```\nPM\u003e Install-Package Hangfire.ConsoleHost\n```\n\n## Usage\n\nRegister transient `HangfireHost` with\n\n```csharp\n    // Register Hangfire Host\n    services.AddHangfireHost();\n```\n\nor add manually by\n\n```csharp\n    // Register Hangfire Host\n    services.AddTransient\u003cIHangfireHost, HangfireHost\u003e();\n```\n\nUse dependency injection in your impementation (and dont forget Dispose!)\n\n```csharp\n\n    public class MyHangfireApp : IDisposable\n    {\n        private readonly IHangfireHost _hangfireHost;\n\n        public MyHangfireApp(IHangfireHost hangfireHost)\n        {\n            _hangfireHost = hangfireHost;\n        }\n\n        public void Dispose()\n        {\n            _hangfireHost?.Dispose();\n        }\n    }\n```\n\nYou can find a full .NET Core console example based on `IHostedService` [here](sample/Server/Program.cs)\n\n## License\n\n```\nMIT License\n\nCopyright (c) 2018 Benjamin Abt\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenjaminabt%2Fhangfire.consolehost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenjaminabt%2Fhangfire.consolehost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenjaminabt%2Fhangfire.consolehost/lists"}